Click or drag to resize

FormattedTextObject Class

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

Namespace:  VO
Assembly:  VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
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
A bounding box representing the smallest rectangle (in the owner window's canvas coordinates) which encloses this TextObject object.
(Inherited from TextObject.)
Public propertyOrigin
A point representing the origin of this DrawObject object in canvas coordinates.
(Inherited from DrawObject.)
Public propertyRasterOperation
A constant, indicating the raster operation in use for this DrawObject object:
(Inherited from DrawObject.)
Public propertySize
A dimension representing the size of this DrawObject object.
(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
Methods
  NameDescription
Public methodDraw
Draw a FormattedTextObject object on a window.
(Overrides Draw.)
Public methodHandle
Return the handle for a DrawObject object.
(Inherited from DrawObject.)
Public methodHitTest
Determine if a given point lies within the bounding box of a DrawObject object.
(Inherited from DrawObject.)
Top
Fields
  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

Reference