----- Original Message ----- 
  From: Paul Andrews 
  To: [email protected] 
  Sent: Thursday, November 22, 2007 9:33 PM
  Subject: [flexcoders] Making a component 'hop' between containers


  OK, I'm being lazy and asking for the best approach to this before I give it 
a go.

  I have a custom component based on a canvas. Inside the component is a panel. 
Inside the panel is a controlBar.

  In the main application I have the custom component (CompA). 

  I want to add another custom component  (CompB) inside the controlBar of the 
custom component (CompA).

  It seems to me I have three choices:

  1) Copy the custom component (CompA) and make a variation of it (CompC) with 
the controlBar populated with CompB (this is probably the path of least 
resistance),
  2) Use actionscript to add CompB to the controlBar of CompA dynamically - 
very doable
Well, the more I think about it, option 3 (my original question) is pretty 
pointless, since option 2 is so easy.

  3) Add the CompB in mxml between the tags for CompA. By default this would 
give me CompB inside CompA, but it won't be in the controlBar. I could then add 
some actionscript to the CompB (or perhaps even CompA) to move CompB into the 
controlBar of CompA.
So, the hopping of components between containers, is shelved.

Paul

Reply via email to