TextBox

class Communicator.Markup.Shape.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


Constructors

TextBox.constructor([position[, text]])

Creates a new TextBox Markup Shape.

Arguments
  • position (Point2()) – optional

  • text (string()) – optional

Return type

TextBox()

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

Return type

RectangleBase()

Returns

the rectangle markup object.

getPadding

TextBox.getPadding()

Gets the Pixel distance between the text and outer rectangle

Return type

number

Returns

the padding value.

getPosition

TextBox.getPosition()

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

Return type

Point2()

Returns

the TextBox position

getTextPortion

TextBox.getTextPortion()

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

Return type

TextMarkupBase()

Returns

the text markup object

getTextString

TextBox.getTextString()

Gets the text string for this box

Return type

string

Returns

the text string

setPadding

TextBox.setPadding(padding)

Sets the Pixel distance between the text and outer rectangle

Arguments
  • padding (number()) – the padding value.

Return type

void

setPosition

TextBox.setPosition(position)

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

Arguments
  • position (Point2()) – the TextBox position

Return type

void

setTextString

TextBox.setTextString(text)

Sets the text string for this box

Arguments
  • text (string()) – the text string

Return type

void