Setting tab stops in an FxTextArea control in Flex Gumbo

The following example shows how you can set tab stops in a Flex Gumbo FxTextArea control by setting the tabStops style to an array of TabStopFormat objects.

Full code after the jump.

To use the following code, you must have Flash Player 10 and a Flex Gumbo SDK installed in your Flex Builder 3. For more information on downloading and installing the Gumbo SDK into Flex Builder 3, see “Using the beta Gumbo SDK in Flex Builder 3”.


<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<FxApplication name="FxTextArea_tabStops_test"
        <BasicLayout />

        HBox {
            paddingLeft: 20;
            paddingRight: 20;
            paddingTop: 20;
            paddingBottom: 20;

    <HBox width="100%" height="100%">
        <FxTextArea id="fxTextArea"
                <String source="data/mlb2008.html" />
                <formats:TabStopFormat alignment="start" />
                <formats:TabStopFormat alignment="end"
                        position="400" />
                <formats:TabStopFormat alignment="end"
                        position="500" />



<!-- data/mlb2008.html -->
<p fontSize="18" textAlign="center">AL East</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>Tampa Bay<tab/>97<tab/>71</p>
<p>New York<tab/>89<tab/>73</p>

<p fontSize="18" textAlign="center">AL Central</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>Kansas City<tab/>75<tab/>87</p>

<p fontSize="18" textAlign="center">AL West</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>Los Angeles<tab/>100<tab/>62</p>

<p fontSize="18" textAlign="center">NL East</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>New York<tab/>89<tab/>73</p>

<p fontSize="18" textAlign="center">NL Central</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>St. Louis<tab/>86<tab/>76</p>

<p fontSize="18" textAlign="center">NL West</p>
<p fontWeight="bold">Team<tab/>W<tab/>L</p>
<p>Los Angeles<tab/>84<tab/>78</p>
<p>San Francisco<tab/>72<tab/>90</p>
<p>San Diego<tab/>63<tab/>99</p>

View source is enabled in the following example.

This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.