Category Archives: FxTextArea

Determining the current scroll position on an FxTextArea control in Flex Gumbo

The following example shows how you can get a Flex Gumbo FxTextArea control’s current vertical scroll position and maximum scroll position by accessing the FxTextArea control’s internal FxScroller instance’s vertical scroll bar.

Full code after the jump.

Continue reading Determining the current scroll position on an FxTextArea control in Flex Gumbo

Setting the break opportunity on an FxTextArea control in Flex Gumbo

The following example shows how you can set the break opportunity for a Flex Gumbo FxTextArea control by setting the breakOpportunity style to one of the static constants in the flash.text.engine.BreakOpportunity class.

Currently, there are four possible values:

  • BreakOpportunity.ALL: Treats all characters in the ContentElement object as mandatory line break opportunities. You can use this option to generate the shortest possible lines, which you can use to create text on a line or similar effects.
  • BreakOpportunity.ANY: Treats any character in the ContentElement object as a line break opportunity. This value is typically used when Roman text is embedded in Asian text and it is desirable for breaks to happen in the middle of words.
  • BreakOpportunity.AUTO: Bases line break opportunities on Unicode character properties. This setting implements the Unicode line breaking properties defined by the Unicode Standard Annex #14.
  • BreakOpportunity.NONE: Treats no characters in the ContentElement object as line break opportunities.

Full code after the jump.

Continue reading Setting the break opportunity on an FxTextArea control in Flex Gumbo