开发者

flex <mx:List> is hidden by other UI component

开发者 https://www.devze.com 2023-01-08 07:02 出处:网络
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

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>


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消