Click or drag to resize

FixedText Class (Typed)

X#
Create a FixedText object.
Inheritance Hierarchy
Object
  VObject
    Control
      TextControl
        FixedText
          HyperLink

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.24 GA
Syntax
[TypesChangedAttribute]
 CLASS FixedText INHERIT TextControl
Request Example View Source

The FixedText type exposes the following members.

Constructors
  NameDescription
Public methodFixedText
Construct a FixedText object.
Top
Properties
Functions
  NameDescription
Public methodSetDrawStyle
Set the alignment style for the text in a FixedText object.
Public methodSetStandardStyle
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 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 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:
X#
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:
X#
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