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.24 GA
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 propertyTabSize
A numeric value representing the tab size—in characters—for a FormattedTextObject object. The default tab size is 8.
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