TextHighlight
Package: Libraries.Interface.Controls.TextStyles · Inherits from: Libraries.Language.Object
Actions
Compare(Libraries.Language.Object object)
This action returns the priority value on this highlight. If multiple highlights overlap in the TextBox, highlights with a higher priority will be rendered on top of highlights with a lower priority.
Parameters
objectLibraries.Language.Object
Returns
integer
GetDrawable(number width, number height)
This action returns a Drawable representing the visual content of a text highlight of a given width and height.
Parameters
widthnumberheightnumber
Returns
GetRenderPriority()
This action returns the priority value on this highlight. If multiple highlights overlap in the TextBox, highlights with a higher priority will be rendered on top of highlights with a lower priority.
Returns
number
IsError()
This action returns a value indicating whether or not this highlight represents an error in the text, most commonly a spelling error. This is used by the accessibility platform to inform screen readers if they interact with a spelling error. By default, this value returns false.
Returns
boolean
IsLineHighlight()
This action returns whether or not this highlight is applied to an entire line of text.
Returns
boolean
IsVisibleWhileSelected()
This action returns whether or not this highlight will be visible on selected text. If this value is false and text is selected, the selection highlight will be rendered on top of this highlight. Note that if the selection highlight uses transparency, this highlight will be partially visible underneath the selection highlight.
Returns
boolean
SetErrorFlag(boolean error)
The SetErrorFlag action is used to designate this highlight as representing an error in the text, most commonly a spelling error. This is used by the accessibility platform to inform screen readers if they interact with a spelling error.
Parameters
errorboolean
SetLineHighlight(boolean isLineHighlight)
This action sets whether or not this highlight should be applied to an entire line of text. The highlight will be applied to whatever line contains the start index of the TextStyle that is using this highlight.
Parameters
isLineHighlightboolean: True to make this highlight appear on an entire line, false to make it appear only for the TextStyle's specific text.
SetRenderPriority(number priority)
This action sets a priority value on this highlight. If multiple highlights overlap in the TextBox, highlights with a higher priority will be rendered on top of highlights with a lower priority.
Parameters
prioritynumber
SetVisibleWhileSelected(boolean visible)
This action sets whether or not this highlight will be rendered on top of the selection highlight for selected text. If the provided value is false, then the highlight will appear normally on unselected text, but will be hidden on selected text. If the text's selection color uses transparency, this highlight will be partially visible underneath the selection highlight.
Parameters
visibleboolean