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

Controlling TabStyle for TabbedMDI

Thread ID:





11390 Mar 4,2004 10:02 AM Mar 4,2004 01:22 PM Windows Forms 3
Tags: Tools
Jay Cincotta
Asked On March 4, 2004 10:02 AM

I like the behavior in the TabbedMDI sample and tab look & feel in the XPTabs demo. Can I have both? More technically, I see that I can set the TabStyle property of a TabControlAdv, for example: tabControlAdv1.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.OneNoteStyleRenderer); On the other hand, integrating the TabbedMDI framework involves creating a TabbedMDIManager. So, is there a way to associate an TabControlAdv with a TabbedMDIManager or some other means to associate a tab renderer with a TabbedMDIManager? Thanks, Jay Cincotta

Jay Cincotta
Replied On March 4, 2004 11:26 AM

Well, I figured something out, though I''d be happy to hear of any smarter solutions. Basically, once the parent has forms, you can get the TabHost from any of them, the get the MDITabPanel from that. The code to do this below, but I''m not happy with it because it only sets tab style for the current MDITabPanel. Therefore, any new tab groups created will not automatically have the desired TabStyle. What I''m really looking for is a way to be able to set the TabStyle as new tab groups are created. Is there an event I can wire to? private void MainForm_Load(object sender, System.EventArgs e) { tabbedMDIManager.AttachToMdiContainer(this); Form[] forms = tabbedMDIManager.MdiChildren; if (forms.Length > 0) { Form doc = forms[0]; TabHost tabHost = tabbedMDIManager.GetTabHostFromForm(doc); MDITabPanel tabPanel = tabHost.MDITabPanel; tabPanel.TabStyle = typeof(OneNoteStyleRenderer); } }

Jay Cincotta
Replied On March 4, 2004 11:41 AM

Okay, finally figured it out. I just need to subclass TabbedMDIManager. Very nice. Here''s the code: public class OneLookTabbedMDIManager : TabbedMDIManager { protected override MDITabPanel CreateMDITabPanel() { MDITabPanel tabPanel = base.CreateMDITabPanel (); tabPanel.TabStyle = typeof(OneNoteStyleRenderer); return tabPanel; } }

Administrator [Syncfusion]
Replied On March 4, 2004 01:22 PM

Hi Jay, Thanks for sharing this information with us. We appreciate your 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.

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.