Function GraCaptionStr() Foundation
Draws a caption.
GraCaptionStr( [<oPS>], <aStartPoint>, [<aEndPoint>], ;
<cCaption>, [<nAlign>], [<nTabChars>] ) --> lSuccess
Constant | Description |
---|---|
XBPALIGN_TOP | Align caption at the top |
XBPALIGN_LEFT *) | Align caption on the left |
XBPALIGN_BOTTOM | Align caption at the bottom |
XBPALIGN_RIGHT | Align caption on the right |
XBPALIGN_HCENTER | Center caption horizontally |
XBPALIGN_VCENTER *) | Center caption vertically |
XBPALIGN_WORDBREAK | Text is wrapped in (multi-line) |
|
The return value of GraCaptionStr() is .T. (true) if the caption is drawn, otherwise it is .F. (false).
The function GraCaptionStr() draws a character string within the rectangle defined by the <aStartPoint> and <aEndPoint>parameters. If <aEndPoint> is not specified, the function GraQueryTextBox() is used to compute a default rectangle. GraCaptionStr() uses the text rectangle to align the caption according to the text alignment specified in parameter <nAlign>. If the text is to be right-aligned, for example, the string is positioned at the right-hand border of the text rectangle.
If tab characters (Chr(9)) are present in the character string, they are expanded to the number of space characters specified in <nTabChars>. GraCaptionStr() also recognizes the shortcut character "~" (tilde). If such a shortcut character is defined in the caption, the character following the tilde is shown underlined.
The function GraCaptionStr() is intended primarily for usage with Micro Presentation Spaces. It cannot be used in graphic segments. Furthermore, GraCaptionStr() neither uses nor updates the current cursor position.
If a Micro PS is passed in argument <oPS>, GraCaptionStr() respects a Visual Style set for the Xbase Part which executed the method :LockPS(). In addition, the caption string is rendered with respect to the state of the object. See instance variable XbpWindow:controlState for further information.
Windows 9x,ME: GraCaptionStr() does not respect a transform set using method XbpPresSpace:setGraTransform().
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.