flex positioning a button within a panel

Posted by pfunc on Stack Overflow See other posts from Stack Overflow or by pfunc
Published on 2010-03-17T19:57:43Z Indexed on 2010/03/17 20:01 UTC
Read the original article Hit count: 217

Filed under:

All I'm trying to do is place a button inside of a panel, rotate that button (so it is vertical) and place it on the edge of the panel. I can;t seem to do this correctly. Here is my code:

<mx:Panel id="weekList"  width="260" height="100%" x="-500" title="Weeks" >
        <mx:List id="weekButtonList"  width="260" borderVisible="false"  contentBackgroundAlpha="0"   dataProvider="{_data.mappoints.week.@number}" itemClick="onWeekClick(event);" >
            <mx:itemRenderer>
                <mx:Component>
                    <mx:Button  buttonMode="true" right="20" width="260" height="50" label="Week {data}"  />
                </mx:Component>
            </mx:itemRenderer>
        </mx:List>

        <mx:HBox id="closeButtonHolder" rotation="90" width="100" >
            <mx:Button  label="OPEN" click="weekListToggle()" />    
        </mx:HBox>

    </mx:Panel>

If you look at the part of the script you will see I am trying to rotate it and move it to the left. I am just trying to move it somewhere, and nothing is working. Also, the text seems to dissapear when I rotate it on a 90% axis. Anyone know what I can do for this?

© Stack Overflow or respective owner

Related posts about flex