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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get the control contained into a TabPageAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

55216 Jan 25,2007 08:36 AM UTC Jan 25,2007 05:54 PM UTC WinForms 1
loading
Tags: Tools
Paul Ankho
Asked On January 25, 2007 08:36 AM UTC

Hi there,
I need to access the control contained into a TabPageAdv when TabControl_SelectedIndexChanged event occurs.

This is my code:

void TabControl_SelectedIndexChanged(object sender, EventArgs e)
{
Syncfusion.Windows.Forms.Tools.MDITabPanel __MDITabPanel = ((Syncfusion.Windows.Forms.Tools.MDITabPanel )sender);
TabPageAdv __TabPageAdv = ( ( TabPageAdv ) __MDITabPanel.TabPages[__MDITabPanel.SelectedIndex] );

System.Diagnostics.Debug.WriteLine("TabControl_SelectedIndexChanged");
}

__TabPageAdv contains the MDIControl that I need but I don't know where it is.

Can you help me?

Thanks and regards!

Murugan [Syncfusion]
Replied On January 25, 2007 05:54 PM UTC

Hi Paul,

MDIControls can be accessed using _MDIPanel.GetSelectedForm() method which returns the Form object for the SelectedTab.

Here is the code snippet :

private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
{

Syncfusion.Windows.Forms.Tools.MDITabPanel _MDIPanel = ( Syncfusion.Windows.Forms.Tools.MDITabPanel )sender;

Form FormAtselectedTab = _MDIPanel.GetSelectedForm();

foreach ( Control ctrl in FormAtselectedTab.Controls )
{

Console.WriteLine( ctrl.Name );

}

}

Herewith I have also attached the sample. Please have a look at the sample and let me know if it helps you.

TTA_TabControl

Thanks for choosing Syncfusion products.

Regards,
Murugan P.S

CONFIRMATION

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.

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

;