|
|
|
ObjectTextAddRect Method
Adds a text string in the given rectangle. It formats text by expanding tabs into appropriate spaces, aligning text to the left, right, or center of the given rectangle, and breaking text into lines that fit within the given rectangle. The type of formatting is specified by Format.
Syntax
ObjectNumber = FlpGrf.ObjectTextAddRect( Left As Single, Top As Single, Right As Single, Bottom As Single, Text As String, Format As Integer )
The ObjectTextAddRect Method has these parts:
|
Part |
Description |
|
FlpGrf |
An object expression that evaluates the Flipper Graph ASP object. |
|
Left |
Left position based on the current ObjectScaleType x-scale setting. |
|
Top |
Top position based on the current ObjectScaleType y-scale setting. |
|
Right |
Right position based on the current ObjectScaleType x-scale setting. |
|
Bottom |
Bottom position based on the current ObjectScaleType y-scale setting. |
|
Text |
String value to add. |
|
Format |
Format specifies the method of formatting the text. It can be any combination of the following values (combine using the bitwise OR operator): |
Settings
Possible settings for Format are:
|
Value |
Name |
Description |
|
0 |
TOP |
Specifies top-justified text (single line only). |
|
0 |
LEFT |
Aligns text flush-left. |
|
1 |
CENTER |
Centers text horizontally. |
|
2 |
RIGHT |
Aligns text flush-right. |
|
4 |
VCENTER |
Specifies vertically centered text (single line only). |
|
8 |
BOTTOM |
Specifies bottom-justified text. This value must be combined with SINGLELINE. |
|
16 |
WORDBREAK |
Specifies word-breaking. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by lpRect. A carriage return-linefeed sequence will also break the line. |
|
32 |
SINGLELINE |
Specifies single line only. Carriage returns and linefeeds do not break the line. |
|
64 |
EXPANDTABS |
Expands tab characters. The default number of characters per tab is eight. |
|
128 |
TABSTOPS |
Sets tab stops. The high-order byte of Format is the number of characters for each tab. The default number of characters per tab is eight. |
|
256 |
NOCLIP |
Draws without clipping. Draws text somewhat faster when DT_NOCLIP is used. |
Remarks
Unlimited numbers of text strings can be added to the current view with this method. The color and font attributes can be set with the ObjectBrush and ObjectFont methods. The foreground and background color and mode of the last ObjectBrush method call set the color attributes for the text string.
The left, top, right , bottom coordinates form a rectangle in which the text is to be formatted.
See Also
ObjectTextAdd Method, ObjectTextAddRect Method, All Object Routines
![]() |
Last modified on: Friday, August 16, 2002