Hi,
I am trying to add dynamically tab page and controls in UltraTabControl. The dynamic controls are not displaying tab page(tabControlPage).
here is the code
UltraTab tab1 = new UltraTab();
UltraTabPageControl tab1Control = new UltraTabPageControl();
tab1.TabPage = tab1Control;
tab1.Text ="TAB1";
tab1.Active =true;
Panel pnl = new Panel();
Button btn = new Button();
btn.Name ="1";
btn.Text ="Hai";
pnl.Controls.Add(btn);
Button btn2 = new Button();
btn2.Name ="2";
tab1Control.Controls.Add(btn2);
this.ultraTabControl1.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab
[] {tab1});
please help me
HI vinod
I m vb.net developer and i add image on ultratabcontrol in this way i hope that will be helpful to you
http://ahmadkhalid44.blogspot.com/2013/05/how-to-add-imageicon-in-ultratool.html
Regards:
Ahmad Khalid
Software Engineer
sorry. it was correct, i made a mistake. Now it is working fine. Thank you very much
it is working fine if all control are created dynamicaly like panel,button ...etc .
my scenario is i have a splittercontainer and i am adding this ultraTabControl in one of splitContainer panel.
Hello,
This is the whole code sample I am using for this:
UltraTab tab1 = new UltraTab(); UltraTabPageControl tab1Control = new UltraTabPageControl(); tab1.TabPage = tab1Control; tab1.Text = "TAB1"; tab1.Active = true; Panel pnl = new Panel(); Button btn = new Button(); btn.Name = "1"; btn.Text = "Hai"; pnl.Controls.Add(btn); Button btn2 = new Button(); btn2.Name = "2"; btn2.Size = new System.Drawing.Size(100, 50); btn2.Text = "Test"; tab1Control.Controls.Add(btn2); this.ultraTabControl1.Tabs.AddRange(new Infragistics.Win.UltraWinTabControl.UltraTab[] { tab1 }); this.ultraTabControl1.Controls.Add(tab1Control); ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[0];
Please do not hesitate to contact me if you need any additional assistance.
i have added the above mentioned code. but still the problem not solved.