FixedText Class (Typed)
|
|
Create a FixedText object.
Inheritance Hierarchy
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.24 GA
Syntax[TypesChangedAttribute]
CLASS FixedText INHERIT TextControl
[TypesChangedAttribute]
public class FixedText : TextControl
Request Example
View SourceThe FixedText type exposes the following members.
Constructors
Properties
Functions|
| Name | Description |
 | SetDrawStyle |
Set the alignment style for the text in a FixedText object.
|
 | SetStandardStyle |
Set the alignment style for the text in a FixedText object.
|
Top
Remarks
Unlike text displayed with Window:TextPrint(), fixed text from a FixedText object is static—they do not need to be redisplayed every time an ExposeEvent occurs. FixedText objects can be created dynamically or from a resource entity.
Tip |
| The text in a FixedText object can be changed by assigning TextControl:TextValue. In such a case, it may be necessary to resize the FixedText object because the size of the control dictates the clipping region for the displayed text. |
Tip |
|
As of Visual Obejcts version 2.7 the FixedText control supports the DrawText and Transparent options. These are on by default.
If the old behaviour is required, set the EXPORTed variable lUseDrawText to FALSE. It is TRUE by default.
If WinXP Themes are enabled and you want to stop the drawing of the theme behind the FixedText control, set the EXPORTed variable lDrawThemeBackground to FALSE. It is TRUE by default.
|
Examples
This example places some fixed text on a window:
1CLASS MyWindow INHERIT TopAppWindow
2HIDDEN MyFT AS OBJECT
3METHOD Init() CLASS MyWindow
4p := Point{10,10}
5d := Dimension{10,10}
6MyFT:= FixedText{SELF,1,p,d,"The text"}
7SELF:Show()
8MyFT:Show()
In Windows, fixed text is equivalent to a static object with one of the SS_LEFT, SS_CENTER, SS_RIGHT styles.
These are normally specified in the resource entity as follows:
1RESOURCE IDD_ABOUT DIALOG 20, 20, 160, 80
2STYLE WS_POPUP | WS_DLGFRAME
3BEGIN
4LTEXT "Left justified" -1, 8, 8, 120, 12
5CTEXT "Centered" -1, 8, 24, 120, 12
6RTEXT "Right justified" -1, 8, 36, 120, 12
7DEFPUSHBUTTON "OK" IDB_OK, 64, 60, 32, 14, WS_GROUP
8END
See Also