wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

CanvasButton in AddChild problem #126

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If CanvasButton is used inside of AddChild (flex states), the content 
inside of CanvasButton is not dispayed. In this cases, Flex compiler does 
not create the descriptors, but uses UIComponent.addChild function to add 
such elements to the parents.

As the possible solution of a problem, the few functions from CanvasButton 
has been overwritten to catch adding of any childs (see the diff in 
attachment)...

Original issue reported on code.google.com by alex.dem...@gmail.com on 27 May 2008 at 12:13

Attachments:

GoogleCodeExporter commented 9 years ago
What is the ETA for this enhancement to be included? I want to be able to
programmatically add children to a CanvasButton. Also, if the canvas property 
was
made protected, it would make CanvasButton highly customizable.

Thanks

Original comment by eltonj...@gmail.com on 28 Oct 2008 at 1:09

GoogleCodeExporter commented 9 years ago

Original comment by dmcc...@gmail.com on 8 Jan 2009 at 5:09

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Minor improvement over alex.demidovich's work.
addChild returns addChildAt(child, numChildren). This is what Container does
internally and will help extending addChildAt if required.

Original comment by eltonj...@gmail.com on 10 Jan 2009 at 2:45

Attachments:

GoogleCodeExporter commented 9 years ago
It took me half the day to figure out that this was the cause of my woes.  And
boy-howdy am I glad you fellers had a solution.  Probably saved me a ton of 
time. 
Nice work! :-)

Original comment by BobFromT...@gmail.com on 28 May 2009 at 6:51

GoogleCodeExporter commented 9 years ago
did you got the solution for this problem ... please reply me to 
ashokmsc.it@gmail.com

Original comment by ashokmsc...@gmail.com on 19 Dec 2009 at 10:00

GoogleCodeExporter commented 9 years ago
did you got the solution for this problem ... please reply me to 
ashokmsc.it@gmail.com

Original comment by ashokmsc...@gmail.com on 19 Dec 2009 at 10:00

GoogleCodeExporter commented 9 years ago
You can add a getter that will return the canvas reference in the 
flexlib.controls.CanvasButton class. Like this:

/**
 * Children container, used to add children programmatically
 * @return  Canvas      children holder
 */
public function get container():Canvas
{
   return canvas;
}

Original comment by julious....@gmail.com on 1 Apr 2011 at 12:43