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 12:39 PM UTC

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 05:31 PM UTC

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 06:17 PM UTC

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 08:56 AM UTC

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.
Up arrow icon