We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Switch tabs in code

Hi,

I have 2 controls which are tabbed document in the application.
I want to selecte a tab manualy in the code.
I tried Focus() method but it doesn't work.

Thanks,

Elad Iluz


1 Reply

VS Vallarasu S Syncfusion Team October 18, 2010 05:16 PM UTC

Hi Elad,

Thanks for your interest in Syncfusion products.

Use the following code to activate a tab in TabbedMDIManger


TabHost[] tabHosts = tabbedMDIManager1.TabGroupHosts;
Form[] MDIChilds = tabbedMDIManager1.MdiChildren as Form[];
if (MDIChilds != null && MDIChilds.Length >= 1)
// You can iterate through the MDIChilds collection for a specific from and,
// pass it to GetTabPageAdvFromForm() method
// tabs[0].MDITabPanel.SelectedTab = tabs[0].MDITabPanel.GetTabPageAdvFromForm(form);
tabHosts[0].MDITabPanel.SelectedTab = tabHosts[0].MDITabPanel.GetTabPageAdvFromForm(MDIChilds[1]);


Please let me know if you have concerns on this.

Regards
Vallarasu S.


Loader.
Live Chat Icon For mobile
Up arrow icon