Alternatively, you can call createComponentsFromDescriptors(); after adding the controlBar as the child, by doing this we do not need to bother about the order in which the children are added to the base container.

Thanks
Harish

On 10/6/06, Mark <[EMAIL PROTECTED]> wrote:

Thanks Dan.

mark

--- In [email protected], "Daniel Freiman" <[EMAIL PROTECTED]> wrote:
>
> controlBar does not seem to be automatically added as a child within the
> Panel class. You need to do it explicitly at the end of
createChildren().
> And as a preemptive reminded, make sure controlBar is the last child
added
> if you want it docked.
>
> - Dan
>

> On 10/6/06, Mark <[EMAIL PROTECTED]> wrote:
> >
> > I've extended Panel and based on numerous post here on FlexCoders I
> > believe I've added the ControlBar correctly, but it just doesn't
> > appear. Here is my very simple example:
> >
> > package com.mh.controls
> > {
> > import mx.containers.Panel;
> > import mx.containers.ControlBar;
> > import mx.controls.Label;
> > import mx.controls.CheckBox;
> >
> > public class TestPanel extends Panel
> > {
> > public function TestPanel()
> > {
> > super();
> > title = "testing";
> > }
> >
> > protected override function createChildren():void
> > {
> > super.createChildren();
> >
> > controlBar = new ControlBar();
> >
> > var lbl:Label = new Label();
> > lbl.text = "testing ctrl bar";
> > ControlBar(controlBar).addChild(lbl);
> >
> > var chkBox:CheckBox = new CheckBox();
> > ControlBar(controlBar).addChild(chkBox);
> >
> > createComponentsFromDescriptors();
> > }
> >
> > }
> > }
> >
> > The end result is a panel, but with no control bar. The interesting
> > thing is that if I didn't call createComponentsFromDescriptors at the
> > end, the bottom of the panel would have no padding.
> >
> > Thanks in advance for any help!
> >
> > mark
> >
> >
> >
> >
> >
> > --
> > 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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to