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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selecte a Tab Page programatically

Thread ID:





11502 Mar 9,2004 07:37 AM UTC Mar 10,2004 11:21 AM UTC WinForms 3
Tags: Tools
Asked On March 9, 2004 07:37 AM UTC

I am using TabbedMDIManager in my application. I would like to select a tab through programatically. Here is the code for choosing a tab programatically. TabHost[] ths = this.tabbedMDIManager.TabGroupHosts; foreach(TabHost th in ths) { MDITabPanel mdiPanel = th.MDITabPanel; IEnumerator pageEnum = mdiPanel.TabPages.GetEnumerator(); while(pageEnum.MoveNext()) { TabPageExt page = pageEnum.Current as TabPageExt; if(page.Text == "Some Text") { mdiPanel.SelectedTab = page; mdiPanel.SelectedTab.Focus(); mdiPanel.BringSelectedTabToView(); break; } } } If i set a different page in MDIPanel SelectedTab, only the tab header is selected and the controls which are residing in the tab are not shown. Can you tell me, how can i overcome the problem. Thanks, Suresh Mani

Administrator [Syncfusion]
Replied On March 9, 2004 11:06 AM UTC

Hi Suresh, Thanks for the code snippet. You could simply select any TabbedMDI child by using code like : this.tabbedMDIchild.Activate(); If you wish to select a particular page from a list of tabbedMDI children, then you could code as follows : foreach(Form fm in tabbedMDIManager.MdiChildren) { if (fm.Text == "some text") { fm.Activate(); } } I have also attached a sample here which illustrates the same. Please refer to it and let me know if this meets your requirements. Thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Replied On March 10, 2004 02:01 AM UTC

Thanks for your reply and sample code. It is working perfectly. Thanks once again. Suresh Mani

Administrator [Syncfusion]
Replied On March 10, 2004 11:21 AM UTC

Hi Suresh, Thanks for the update. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon