Hello,
In a UltraWinTabControl, is there a way to have a button in the tab list to create a new tab, much like we have in recent web browsers (Firefox, IE 7 and 8...) ?
Regards,
Damien
Damien,
There's nothing built into the control to handle this, but it's pretty straightforward to implement. Basically, you should create a tab at the time you create the UltraTabControl, setting the Key/Text to "+". Then you would handle the SelectedTabChanging event, cancelling the selection of the "+" tab and inserting a new one:
private void ultraTabControl1_SelectedTabChanging(object sender, SelectedTabChangingEventArgs e){ if (e.Tab.Key == "+") { e.Cancel = true; UltraTab tab = this.ultraTabControl1.Tabs.Insert(this.ultraTabControl1.Tabs.Count - 1); tab.Selected = true; }}
-Matt
Thanks Matt, that was indeed pretty straightforward!