Click or drag to resize

FormattedTextObject Class (Typed)

X#
Provide a way to format a string specifying position (origin), font, and color.
Inheritance Hierarchy
Object
  VObject
    DrawObject
      TextObject
        FormattedTextObject

Namespace:  XSharp.VO.SDK
Assembly:  XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.19
Syntax
 CLASS FormattedTextObject INHERIT TextObject
Request Example View Source

The FormattedTextObject type exposes the following members.

Constructors
  NameDescription
Public methodFormattedTextObject
Construct a FormattedTextObject object.
Top
Properties
  NameDescription
Public propertyBoundingBox (Inherited from TextObject.)
Public propertyColor (Inherited from TextObject.)
Public propertyDisplayText (Inherited from TextObject.)
Public propertyFont (Inherited from TextObject.)
Public propertyOrigin (Inherited from DrawObject.)
Public propertyRasterOperation (Inherited from DrawObject.)
Public propertySize (Inherited from DrawObject.)
Public propertyTabSize
A numeric value representing the tab size—in characters—for a FormattedTextObject object. The default tab size is 8.
Top
Functions
  NameDescription
Public methodDestroy (Inherited from TextObject.)
Public methodDraw (Inherited from DrawObject.)
Public methodHandle (Inherited from DrawObject.)
Public methodHitTest (Inherited from DrawObject.)
Top
Globals and Defines
  NameDescription
Public fieldoCargo
Cargo slot.
(Inherited from VObject.)
Top
Remarks
A FormattedTextObject object has the same behavior as a TextObject object with the exception that it recognizes characters like tab (Chr(9)), carriage return (Chr(13)), and newline (Chr(10)), and is able to translate them appropriately. You can use FormattedTextObject:TabSize to change the default tab of a FormattedTextObject object and the Window:Draw() method to display it.
Examples
This example uses a formatted text object to print "World" underneath "Hello":
X#
1oFT := FormattedTextObject{Point{10,10},"Hello" + Chr(10) + "World"}
2?oFT
See Also