This is a requirement were you wanted to add a Button or Button’s to Panel’s Control Bar and you are wondering how to achieve this, iam telling you this is simple and the code example is given below.
Here we have to use a subtag in Panel tag control and the tag is <mx:ControlBar />
Example:
<mx:ControlBar horizontalAlign=”center” width=”385″>
<mx:Button label=”Clear” click=”output.text =”” />
<mx:Button label=”Clear” click=”output.text =”” />
<mx:Button label=”Clear” click=”output.text =”” />
</mx:ControlBar>
This within the Panel mx:Tag.As below,
<mx:Panel title=”Kumar Gandhi’s Panel” x=”438″ y=”59″>
<mx:TextArea id=”output” width=”385″ height=”220″ />
<mx:TextInput id=”input” width=”385″ />
<mx:ControlBar horizontalAlign=”center” width=”385″>
<mx:Button label=”Clear” click=”output.text =”” />
<mx:Button label=”Clear” click=”output.text =”” />
<mx:Button label=”Clear” click=”output.text =”” />
</mx:ControlBar>
</mx:Panel>
This gives the panel Control bar with buttons..
This snap Shot shows the buttons on Panel Control Bar..


July 6, 2008 at 2:03 am |
Hi,
I want to create a link through a button. How do i go about it?
(A link to another to another html page)
Thanks
Sameer
July 6, 2008 at 5:16 am |
Hi ,
U got to use navigateToUrl () methos of the urlRequest method.
var u:URLRequest=new URLRequest(“http://flexonblog.wordpress.com/”);
navigateToUrl (u,”_blank”)
u got to explore the method navigateToUrl () it has three different combinations.
regards,
kumar.
December 9, 2008 at 11:45 am |
hey,
could we add btns to header of panel?
December 10, 2008 at 2:04 pm |
yes we can do this, here the header is called titleBar of the Panel.
Code::
var btn:Button;
btn.width=90;
btn.height=50;
var hbox:HBox;
hbox.width=300;
hbox.addChild(btn);
this.titleBar.addChild(hbox);
here this is the Panel , assuming that you use this code inside a Panel., On CreationComplete.
regards,
kumar.