Posted 15 June 2018, 10:52 am EST - Updated 4 October 2022, 2:16 am EST
DockingTab: FontLayout per Tab possible
Posted by: andreas.kren on 15 June 2018, 10:52 am EST
-
-
Posted 15 June 2018, 10:53 am EST
in a simple DockingTab (w/o docking) I forgot to mention.
-
Posted 15 June 2018, 1:15 pm EST
Is this possible with a “themed” docking tab?
-
Posted 18 June 2018, 4:14 am EST
Hi Andreas,
actually, there are properties “C1DockingTabPage.TabBackColor / TabBackColorSelected / TabForeColor / TabForeColorSelected” to change the colors. But it seems they are ignored when using a VisualStyle (here, only the “…Selected” properties work) or a C1Theme (don’t work at all).
C1, could you take a look at this? We use custom back/fore colors, too, and I just noticed that this went broken…
There is no simple way to change the font . You could owner draw the tab area by handling the event “C1DockingTab.DrawTab” => but here, you would have to take care for drawing all the tab area, including borders and selection, which will probably not result in the same layout that C1 provides :-).
The api for rendering (namespace “C1.Win.C1Command.Docking.Drawing”) is private API, otherwise you might e.g. subclass one of the renderers and provide custom colors for certain items.Best regards
Wolfgang
-
Posted 18 June 2018, 5:57 am EST
Hello,
Thank you, Wolfgang.
Andreas, as per our observations (with Build Version 4.0.20181.307), the TabForeColor, TabForeColorSelected, TabBackColor, TabBackColorSelected properties related to C1DockingTabPage work fine even when the VisualStyles are set. However, when a theme is applied, the tabpages seem to lose the formatting based on these properties. We have reported this issue to the concerned team [Internal Tracking ID: 327692] and will get back to you once we hear from them.
Also, we are discussing if the other font related attributes can be set for the tab page’s text.Best Regards,
Esha -
Posted 18 June 2018, 6:31 am EST
I will examine what happens if I first set the theme , then set it to “nothing” 4 the control and then set the mentioned TabBackColor etc. properties… (that s my hope
) … I ll report
In the meantime … mobile greets and thanx
-
Posted 18 June 2018, 8:02 am EST
ok, silly little hope. And yes, tabs in the old app are “ownerdrawn”…
-
Posted 18 June 2018, 8:02 am EST
ok, silly little hope. And yes, tabs in the old app are “ownerdrawn”…
-
Posted 19 June 2018, 12:41 am EST
Hello,
Which old apps are you referring to? Do you mind sharing one here?
Seems like you are talking about MS TabControl. “C1DockingTab.DrawTab” is the drawing related event corresponding to C1DockingTab.Thanks,
Esha -
Posted 19 June 2018, 3:43 am EST
Hi Esha,
the BackColor does not work when a VisualStyle is set, see attached sample (using .307): tab 2 should have a yellow background, but it is only shown when the mouse is hovering over it. I expect it to be yellow always.
Best regards
Wolfgang
-
Posted 19 June 2018, 3:45 am EST
Sorry, the attachment got lost…
TabLayout.zip -
Posted 20 June 2018, 12:21 am EST
Hello Wolfgang,
The file you shared cannot be downloaded. Please try attaching it again.
Thanks,
Esha -
Posted 20 June 2018, 3:00 am EST
Here we go again…
Sorry, I forgot that uploads cause trouble on my local Firefox. Hope it works now…
TabLayout.zip -
Posted 20 June 2018, 11:36 am EST
The “old” app I have to re-program (to add some new features) is a c and win32api app. you can see a small screenshot in my first post. The tabheaders in that old app were ownerdrawn. However I have come over with the customer that we will use a certain theme and the tab control will not be themed but its colors will be set to the themecolors, so I can set the tabheaders to other colors if needed. This is more important than that the app is themable for the users.
If there is a solution from C1 this however would be nice …
Thank you.
-
Posted 21 June 2018, 1:42 am EST
We are investigating on the same and will get back to you on this soon.
Thanks,
Esha -
Posted 28 August 2018, 8:47 am EST
Hi Andreas,
We are happy to let you know that the issue has been fixed. You may use the following URL to test the fix at your end: http://prerelease.componentone.com/dotnet40/c1winforms/2018-t2/C1WinForms.4_4.0.20182.318.zip
Please do let us know if you still face any issues.Thanks,
Ruchir Agarwal