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
Methods
Constructors
Methods
getBoxPortion
- TextBox.getBoxPortion()
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
the rectangle markup object.
- Return type
RectangleBase
getPadding
- TextBox.getPadding()
Gets the Pixel distance between the text and outer rectangle
- Returns
the padding value.
- Return type
number
getPosition
- TextBox.getPosition()
Gets the position in screen space of the top-left corner of the TextBox rectangle
- Returns
the TextBox position
- Return type
Point2
getTextPortion
- TextBox.getTextPortion()
Gets the Text portion of the TextBox. Use the methods on this object to modify the appearance of the text string
- Returns
the text markup object
- Return type
TextMarkupBase
getTextString
- TextBox.getTextString()
Gets the text string for this box
- Returns
the text string
- Return type
string
setPadding
- TextBox.setPadding(padding)
- Arguments
padding (
number()) – the padding value.
Sets the Pixel distance between the text and outer rectangle
- Return type
void
setPosition
setTextString
- TextBox.setTextString(text)
- Arguments
text (
string()) – the text string
Sets the text string for this box
- Return type
void