TextBox

class Markup.Shapes.TextBox()

This object encapsulates a text and rectangle object into one entity. Sizing of the box and positioning of the string is handled by the system. This class consists of two portions which control the look and feel of the markup. The text portion controls the styling of the text, while the box portion controls the styling of the outer rectangle.

Constructors

Markup.Shapes.TextBox.constructor()
TextBox(position: Point2, text: string): TextBox

Creates a new TextBox Markup Shape.

Parameters

position: Point2

the screen space point of the top left of the box. Default value is (0,0).

text: string

the text string for the box. Default value is empty string.

Returns: TextBox

Methods

Markup.Shapes.TextBox.getBoxPortion()

inherited

getBoxPortion(): RectangleBase

Gets the Box portion of the TextBox. Use the methods on this object to modify the appearance of the rectangle around the text string

Returns: RectangleBase

the rectangle markup object.
Markup.Shapes.TextBox.getPadding()

inherited

getPadding(): number

Gets the Pixel distance between the text and outer rectangle

Returns: number

the padding value.
Markup.Shapes.TextBox.getPosition()
getPosition(): Point2

Gets the position in screen space of the top-left corner of the TextBox rectangle

Returns: Point2

the TextBox position
Markup.Shapes.TextBox.getTextPortion()

inherited

getTextPortion(): TextMarkupBase

Gets the Text portion of the TextBox. Use the methods on this object to modify the appearance of the text string

Returns: TextMarkupBase

the text markup object
Markup.Shapes.TextBox.getTextString()
getTextString(): string

Gets the text string for this box

Returns: string

the text string
Markup.Shapes.TextBox.setPadding()

inherited

setPadding(padding: number): void

Sets the Pixel distance between the text and outer rectangle

Parameters

padding: number

the padding value.

Returns: void

Markup.Shapes.TextBox.setPosition()
setPosition(position: Point2): void

Sets the position in screen space of the top-left corner of the TextBox rectangle

Parameters

position: Point2

the TextBox position

Returns: void

Markup.Shapes.TextBox.setTextString()
setTextString(text: string): void

Sets the text string for this box

Parameters

text: string

the text string

Returns: void