--- In [email protected], Manish Jethani
<[EMAIL PROTECTED]> wrote:
> On 6/24/05, flexasher <[EMAIL PROTECTED]> wrote:
> > I have extended the ControlBar in hopes of making it collapsable.  For
> > the most part it works. However, I am having difficulties when the
> > width is set to 100%. The problem that I am having only occurrs when
> > the control bar is contained in a divided box and when the control bar
> > is placed at the top of it's panel and title bar set to 0. It seems
> > that when I call the resize effect it sets the width of the control
> [...]
> 
> I undersand that what you posted is the code for your custom
> ControlBar.  Can you explain the above paragraph with some MXML. ;)  I
> just want to know what your layout looks like and where the
> ControlBar-derived class is placed.  Just some dummy MXML would be
> okay.

Here is the sample mxml I have been using for testing purposes.
Thanks!

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
xmlns:cmp="com.pjm.containers.*">
        <mx:Script>
/*              <![CDATA[
                        import mx.containers.*
                        import mx.utils.Delegate
                        function onDivideResize(event)
                        {
                                control.width += event.delta
                        }               
                ]]>
*/
        </mx:Script>
        <mx:Panel headerHeight="0" cornerRadius="15" width="100%"
height="100" resize="true">
        <cmp:ControlBar id="control3" autoLayout="true" width="100%"
height="50" comboBox="{SoftwareSelection0}" >

                        <mx:Button label="Bam" />
                               <mx:ComboBox id="SoftwareSelection0" >
                                                        
                                    <mx:dataProvider>
                                        <mx:Array>
                                            <mx:String>Macromedia 
Flex</mx:String>
                                            <mx:String>Macromedia 
Dreamweaver</mx:String>
                                            <mx:String>Macromedia 
ColdFusion</mx:String>
                                            <mx:String>Macromedia 
Flash</mx:String>
                                        </mx:Array>
                                    </mx:dataProvider>
                        
                                </mx:ComboBox>
                </cmp:ControlBar>
                <mx:VBox cornerRadius="10" width="100%" height="100%"
><!--autoLayout="true"-->
                        <mx:Label text="In the panel" />
                        <mx:TextArea text="'{control.preferredWidth} + 
{control.minWidth} +
{control.maxWidth}+ {control.width}'" editable="true" height="100%"
width="100%" >
                        </mx:TextArea>
                </mx:VBox>
        </mx:Panel>
        <mx:DividedBox id="hdb1" direction="horizontal" borderStyle="solid"
width="100%" height="400" >
        <mx:Panel id="panel1" headerHeight="0" cornerRadius="10" width="100%"
height="200" >
                <cmp:ControlBar id="control" autoLayout="true" width="100%"
height="50" comboBox="{SoftwareSelection}" >

                        <mx:Button label="Bam" />
                               <mx:ComboBox id="SoftwareSelection" >
                                                        
                                    <mx:dataProvider>
                                        <mx:Array>
                                            <mx:String>Macromedia 
Flex</mx:String>
                                            <mx:String>Macromedia 
Dreamweaver</mx:String>
                                            <mx:String>Macromedia 
ColdFusion</mx:String>
                                            <mx:String>Macromedia 
Flash</mx:String>
                                        </mx:Array>
                                    </mx:dataProvider>
                        
                                </mx:ComboBox>
                </cmp:ControlBar>
                <mx:VBox cornerRadius="10" width="100%" height="100%" 
autoLayout="true">
                        <mx:Label text="In the panel" />
                        <mx:TextArea text="{control.preferredWidth} 
{panel1.width} +
{control.minWidth} + {control.maxWidth}+ {control.width}'"
editable="true" height="100%" width="100%" >
                        </mx:TextArea>
                </mx:VBox>

        </mx:Panel>
        <mx:Panel id = "panel2" headerHeight="1" cornerRadius="10"
width="100%" height="100%">

                <cmp:ControlBar id="control2" direction="horizontal" 
width="100%"
height="50" comboBox="{SoftwareSelection2}" >

                        <mx:Button label="Hi!" />
                               <mx:ComboBox id="SoftwareSelection2">
                        
                                    <mx:dataProvider>
                                        <mx:Array>
                                            <mx:String>Macromedia 
Flex</mx:String>
                                            <mx:String>Macromedia 
Dreamweaver</mx:String>
                                            <mx:String>Macromedia 
ColdFusion</mx:String>
                                            <mx:String>Macromedia 
Flash</mx:String>
                                        </mx:Array>
                                    </mx:dataProvider>
                        
                        </mx:ComboBox>
                </cmp:ControlBar>
                        <mx:VBox cornerRadius="10" width="100%" height="100%"
autoLayout="true">
                <mx:Label text="In the panel" />
                <mx:TextArea text="'{control2.preferredWidth} + 
{control2.minWidth}
+ {control2.width}'" editable="true" height="100%" width="100%">
                </mx:TextArea>
        </mx:VBox></mx:Panel>
        </mx:DividedBox>
</mx:Application>




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to