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

Bold active tab in docking manager.

Is there a way to make the text of the docking manager''s active tab bold?

4 Replies

AD Administrator Syncfusion Team October 22, 2004 08:39 AM

Hi Ronda, The custom caption rendering feature of the Docking Manager is supported through the ProvideGraphicsItems event as ahown in the code snippet below : private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg) { // check if the control is active if (arg.Control.Focused == true) { arg.CaptionFont = new Font("Courier",11,FontStyle.Bold); } } Please take a look at this KB also. Thanks, Stephen. >Is there a way to make the text of the docking manager''s active tab bold?


RO Ronda October 26, 2004 01:31 PM

Thanks for the response, but how do I get the event to fire? (see attached sample). Also to be sure, I am trying to change the text on the actual tab not the caption at the top. Will this work for the tab text also? >Hi Ronda, > >The custom caption rendering feature of the Docking Manager is supported through the ProvideGraphicsItems event as ahown in the code snippet below : > >private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg) >{ >// check if the control is active >if (arg.Control.Focused == true) >{ >arg.CaptionFont = new Font("Courier",11,FontStyle.Bold); >} >} > >Please take a look at this KB also. > >Thanks, > >Stephen. > >>Is there a way to make the text of the docking manager''s active tab bold? TestDockingFont_2706.zip


RO Ronda October 26, 2004 02:17 PM

Ok I figured out that the event was not being fired because I had themes turned on. Still this doesn''t solve the problem I need to change the text on only the active tab the tab text not the tab''s caption text. I don''t see anything for that.


AD Administrator Syncfusion Team October 28, 2004 04:56 AM

Hi Ronda, Sorry for the confusion. Here is the correct code snippet for setting the active tab text private void dockingManager1_NewDockStateEndLoad(object sender, System.EventArgs e) { DockHost dhost = this.pnlpanel1.Parent as DockHost; DockHostController dhc = dhost.InternalController as DockHostController; if(dhc.ParentController is DockTabController) { //Accessing the Internal Tab DockTabControl docktab = (dhc.ParentController as DockTabController).TabControl; //Setting the Font style for the selected Tab. docktab.ActiveTabFont = new System.Drawing.Font("TimesNewRoman",10,FontStyle.Bold); } } Here is a sample F20527DockingTabBold_8438.zip Please let me know if you have any questions. Thanks. Best regards, Stephen. >Ok I figured out that the event was not being fired because I had themes turned on. Still this doesn''t solve the problem I need to change the text on only the active tab the tab text not the tab''s caption text. I don''t see anything for that.

Loader.
Live Chat Icon For mobile
Up arrow icon