Aug 25, 2008, 10:07 AM
[CLOSED] Can't add dynamically a button to a panel
(After that, I add panel1 to a accordion menu)
Coolite.Ext.Web.Panel panel1 = new Coolite.Ext.Web.Panel(); panel1.ID = "Panel1"; panel1.Title = "Panel 1"; panel1.Border = false; panel1.BodyStyle = "padding:6px;"; panel1.Icon = Icon.FolderGo; Coolite.Ext.Web.Button button1 = new Coolite.Ext.Web.Button(); button1.Text = "Button"; //panel1.Controls.Add(button1); panel1.Items.Add(button1);
I've tried with panel1.Controls.Add and panel1.Items.Add (what is the difference?), but the button doesn't show when I run the application.
Do you know why it isn't working?