Sorry, hit that send button too early:
override protected function createChildren():void
{
super.createChildren();
button = new Button();
b.width = 16;
b.height = 16;
titleBar.addChild(b);
}
to correctly position the button override the updateDisplayList() method
which will get called every time the Panel changes its size.
Dirk.
> -----Original Message-----
> From: Dirk Eismann
> Sent: Wednesday, April 19, 2006 1:05 PM
> To: '[email protected]'
> Subject: RE: [flexcoders] Minimize button on panel title bar
>
> Try to add the Button to the Panel's titleBar UIComponent
> instead. This way you can still use includeInLayout = true
> and the Button will work as expected. Just make sure to
> explicitely set the width and height of the Button, otherwise
> it won't be drawn inside the titleBar.
>
> i.e. inside your Panel subclass:
>
> override protected function createChildren():void
>
> Dirk.
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[EMAIL PROTECTED] On Behalf Of B.Brey
> > Sent: Wednesday, April 19, 2006 12:32 PM
> > To: Flex
> > Subject: [flexcoders] Minimize button on panel title bar
> >
> > I've managed to get a button positioned correctly on a panel using
> > includeInLayout = false.
> > But it seems that there is something blocking events to the
> button now
> > (Button does not work). Does anyone have any ideas on how
> to fix this?
> >
> >
> > with regards,
> >
> > Bas
> >
> >
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
--
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/