TextBlock$Typings extension
Properties
-
choices
↔ Array<String>?
-
Gets or sets the an array of possible choices for a custom TextEditingTool.
The value must be an array of strings.
getter/setter pair
-
editable
↔ bool
-
Gets or sets whether or not this TextBlock allows in-place editing of the #text
string by the user with the help of the TextEditingTool.
The default is false.
getter/setter pair
-
errorFunction
↔ void Function(TextEditingTool, String, String)?
-
Gets or sets the function to call if a text edit made with the TextEditingTool is invalid.
The default is null.
getter/setter pair
-
flip
↔ EnumValue
-
Gets or sets how the TextBlock is displayed: Either normally or with a Horizontal or Vertical flip or both.
getter/setter pair
-
font
↔ String
-
Gets or sets the current font settings.
The font property must be a valid CSS string describing a font.
The font string can accept several CSS properties but they must be
in a specific order in order to render correctly across all browsers:
getter/setter pair
-
formatting
↔ EnumValue
-
Gets or sets the policy for trimming whitespace on each line of text.
getter/setter pair
-
graduatedEnd
↔ num
-
Gets or sets the fractional distance along the main shape of a "Graduated" Panel at which this kind of tick text should end.
The default is 1; the value should range from 0 to 1.
getter/setter pair
-
graduatedFunction
↔ String Function(num, TextBlock)?
-
Gets or sets the function to convert from a value along a "Graduated" Panel to a string.
The default returns a string representing the value rounded to at most 2 decimals.
getter/setter pair
-
graduatedSkip
↔ bool Function(num, TextBlock)?
-
Gets or sets the function to determine which values along a "Graduated" Panel will be skipped.
The default is null and doesn't skip any text labels.
getter/setter pair
-
graduatedStart
↔ num
-
Gets or sets the fractional distance along the main shape of a "Graduated" Panel at which this text should start.
The default is 0; the value should range from 0 to 1.
getter/setter pair
-
interval
↔ num
-
Gets or sets how frequently this text should be drawn within a "Graduated" Panel,
in multiples of the Panel#graduatedTickUnit.
The default is 1. Any new value must be a positive integer.
getter/setter pair
-
isMultiline
↔ bool
-
Gets or sets whether or not the text displays multiple lines or embedded newlines.
If this is false, all characters including and after the first newline will be omitted.
The default is true.
getter/setter pair
-
isStrikethrough
↔ bool
-
Gets or sets whether or not the text has a strikethrough line (line-through).
The default is false.
getter/setter pair
-
isUnderline
↔ bool
-
Gets or sets whether or not the text is underlined.
The default is false.
getter/setter pair
-
lineCount
↔ num
-
This read-only property returns the computed number of lines in this TextBlock, including lines created
from embedded newlines (
\n
), #wrapping, and #maxLines.
getter/setter pair
-
lineHeight
↔ num
-
This read-only property returns the height of a line of text in this TextBlock, not including any #spacingAbove or #spacingBelow.
getter/setter pair
-
maxLines
↔ num
-
Gets or sets the maximum number of lines that this TextBlock can display.
Value must be a greater than zero whole number or
Infinity
.
The default is Infinity
.
getter/setter pair
-
naturalBounds
↔ Rect
-
This read-only property returns the natural bounds of this TextBlock in local coordinates,
as determined by its #font and #text string, and optionally its #desiredSize.
getter/setter pair
-
overflow
↔ EnumValue
-
Gets or sets how text that is too long to display should be handled.
getter/setter pair
-
spacingAbove
↔ num
-
Gets or sets additional spacing above each line of text.
The default is zero. The value may be negative.
getter/setter pair
-
spacingBelow
↔ num
-
Gets or sets additional spacing below each line of text.
The default is zero. The value may be negative.
getter/setter pair
-
stroke
↔ dynamic
-
Gets or sets the Brush or string that describes the stroke (color) of the text that is drawn.
getter/setter pair
-
text
↔ String
-
Gets or sets the TextBlock's text string. The default is an empty string.
The text of a TextBlock, along with the values of #font, #wrap,
#isMultiline and sizing restrictions are what naturally determine
the size of the TextBlock.
getter/setter pair
-
textAlign
↔ TextAlign
-
Gets or sets the alignment location in the TextBlock's given space.
The only possible values are
"start"
, "end"
, "left"
, "right"
, and "center"
.
Any other value is invalid.
getter/setter pair
-
textEdited
↔ void Function(TextBlock, String, String)?
-
Gets or sets the function that is called after the TextBlock's text has been edited by the TextEditingTool.
getter/setter pair
-
textEditor
↔ HTMLInfo?
-
Gets or sets the HTMLInfo that this TextBlock uses as its text editor in the TextEditingTool.
If null, the TextBlock will use the default text editor of the TextEditingTool.
The default is null.
The value should be set to an instance of HTMLInfo.
Setting this property might not affect any ongoing text editing operation.
getter/setter pair
-
textValidation
↔ bool Function(TextBlock, String, String)?
-
Gets or sets the predicate that determines whether or not a user-edited string of text is valid.
If this is non-null, the predicate is called in addition to any TextEditingTool#textValidation predicate.
See TextEditingTool#isValidText for more details.
getter/setter pair
-
verticalAlignment
↔ Spot
-
Gets or sets the vertical alignment Spot of this TextBlock, used when
the TextBlock has more available vertical space than it needs to draw all lines.
getter/setter pair
-
wrap
↔ EnumValue
-
Gets or sets whether the text should be wrapped if it is too long to fit on one line.
getter/setter pair