Skip to main content
Participant
September 1, 2010
Answered

DivElement columnWidth

  • September 1, 2010
  • 1 reply
  • 555 views

Hi,

I have an application where I would like to create a TextFlow with a heading and body text such as:

Heading Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras posuere posuere sem...

And I would like the body text to appear in multiple columns. I have created a single TextFlow in a single TextArea and added the columnWidth and columnGap parameters to a div containing the body text, but I only get a single column for the body text. If I set the columnWidth and columnGap on the entire TextFlow, I get multiple columns, but I don't want the title text to be in one column. I can create two TextArea controls in a VGroup and only set the column parameters on the control for the body, but this seems like it should be unncecessary.

-Brian

<?xml version="1.0" encoding="utf-8"?>
<s:Application name="RichEditableTextExample"
               xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
   
    <s:Panel title="TextArea TLF"
             width="90%" height="90%"
             horizontalCenter="0" verticalCenter="0">
        <s:TextArea id="ta1" textAlign="left" width="600">
            <s:textFlow>
                <s:TextFlow>
                    <s:p textAlign="center"><s:span fontWeight="bold">Heading Text</s:span></s:p>
                    <s:div columnWidth="100" columnGap="10">
                        <s:p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras posuere posuere sem, eu congue orci mattis quis. Curabitur pulvinar tellus venenatis ipsum tempus lobortis. Vestibulum eros velit, bibendum at aliquet ut.</s:p>
                    </s:div>
                </s:TextFlow>
            </s:textFlow>
        </s:TextArea>
    </s:Panel>
   
</s:Application>

This topic has been closed for replies.
Correct answer

bldrbldr wrote:

I can create two TextArea controls in a VGroup and only set the column parameters on the control for the body, but this seems like it should be unncecessary.

It should be unnecessary, but right now that's the only way to get what you want. We don't yet allow elements to straddle columns, but it's a feature we want to add eventually.

1 reply

Correct answer
September 1, 2010

bldrbldr wrote:

I can create two TextArea controls in a VGroup and only set the column parameters on the control for the body, but this seems like it should be unncecessary.

It should be unnecessary, but right now that's the only way to get what you want. We don't yet allow elements to straddle columns, but it's a feature we want to add eventually.