tags:

views:

22

answers:

1

In flex UI, my <mx:list> can not be shown completely because of other component shelterring (for example: the refresh button shelter part of it ). How can I make the <mx:list> in front of all other UI component.

This is my code:

<s:HGroup  verticalAlign="middle">

        <s:Label text="Choose Log File"/>
        <mx:ComboBox id ="logFileChooseCombo" dataProvider="{fileNameList}" width="150" color="0x000000"
                     close="changeLogFilesHandler(event);"/>

        <mx:Spacer width="320" />
        <s:Label text="Filter or HighLight:" />

        <mx:ComboBox id ="filterChooseCombo" dataProvider="{filterOrHighlight}" width="150" color="0x000000"/>
        <s:VGroup height="25">

            <s:TextInput id="logContentInput" change="filterLogContent()"
                         enabled="true"
                         focusIn="clearMyTextInput()"
                         text="Filter/HightLight"
                         width="250" height="26"/>



            **<mx:List id="searchMsgList"** x="65" y="35" width="200" height="200"  fontSize="12" 
                      change="itemChangEvent(event);"       />





        </s:VGroup>


    </s:HGroup>

    </mx:Canvas>


    <s:HGroup  verticalAlign="middle">

        <s:Label text="Filter By Log Level:"/>
        <mx:ComboBox id ="logLevelCombo" dataProvider="{logLevelsInt}" width="150" color="0x000000"
                     close="changeLogLevelHandler(event);"/>


        <s:CheckBox id="showStack"  click="showStackTrace(event)" selected="false"/>
        <s:Label text="show stackTraces"/>
        <mx:Spacer width="550" />
        <s:Button id="test" label="refresh2">

        </s:Button>

    </s:HGroup>
A: 

You have a lot going on, with a mix of nested layouts and a mix of Halo and Spark containers. I'm not sure what layout you're trying to create.

That said, take a look at the swapChildren method. Something like this should work:

this.swapChildren(refresh2, searchMsgList);

But it will most likely hide your refresh button, which seems less than ideal.

A few things strike me:

Inside your first VGroup you have x and y values specified. I thought those values were ignored inide VGroups, which automatically position your children in a vertical line.

I see an closing </mx:Canvas> tag, but not an opening canvas tag. It is unusual to me to use a canvas among all the HGroups and VGroups.

www.Flextras.com
Thanks your comments. You are right, I am new flex developer. I will have a try about swapChidren.
Hi Amarghosh,It seem that the swapChildren does not work perfectly. I want to know in Flex is there any way to make a flex UI component in front of all other compoments?
can you quantify "swapChildren does not work perfectly"? I've never had a problem with it. you can use swapChildrenAt to put one component in front of everything else.
www.Flextras.com