Maybe you can just remove the console panel from the divided box so that
it has only one child and add it back in when you want it?  You can't
get the DividedBox to change child pointers like you're attempting.

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of charged2885
Sent: Tuesday, December 13, 2005 1:19 PM
To: [email protected]
Subject: [flexcoders] Toggle a child of a DividedBox?

I have a console which displays debugging messages as a child of a
VDividedBox. I want 
my user to be able to toggle the visibility of the console. When they
set it to off, it should 
disappear including the little drag gripper.

My idea is to create a ViewStack with 2 children. One of the children is
the main 
application's "stage". The other is a VDividedBox with 2 children of
it's own: the main 
application's "symbolicStage" and the "consolePanel". I could then
toggle between the two 
to display the console. I planned on Binding the symbolicStage to the
ViewStack's stage 
using a Binding tag:

<mx:Binding source="stage" destination="symbolicStage" />

But it seems you need to bind to properties and not objects themselves.
Does anyone have 
any idea how to get around this problem?

My mitigated idea in code is:

<mx:Binding source="stage" destination="symbolicStage" />
<mx:ViewStack width="100%" height="100%" creationPolicy="all">
  <mx:VDividedBox liveDragging="true" width="100%" height="100%">
    <mx:Box id="symbolicStage" width="100%" height="100%"/>
    <view:ConsolePanel width="100%"/>
  </mx:VDividedBox>
  <mx:Box id="stage" width="100%" height="100%">
    <mx:Label text="This is the stage"/>
  </mx:Box>
</mx:ViewStack>

Thanks,

Todd







--
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



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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