Panel Header font

Answered
0
0

What is the best way to set a panel header’s font to bold?

If I set the Panel Font to bold the header displays bold, however all the controls on the panel inherit the bold setting.

Is it possible to override the inheritance?

Thanks for your help

Ewan

 

  • You must to post comments
Great Answer
0
0

Hi Ewan,

There are several ways to change specifically the panel header’s font.  The first is through a Mixin:

"panel": {
  "inherit": "panel",
  "components": {
      "title": {
         "states": {
           "default": {
               "properties":{
                   "font": "windowTitle"
               }
           }
         }
       }
  }
}

The second way is through VB.net / C# code:

VB.NET
Application.Theme.Appearances.panel.components.title.states.default.properties = New With {.font = "windowTitle"}

C#
Application.Theme.Appearances.panel.components.title.states.default.properties = new {font = "windowTitle"};

Depending on what you’re doing one or the other might be more useful!

You can also stop the inheritance of the font by using a Panel or other container with set properties.

  • You must to post comments
0
0

Hi Ewan,

Sorry for the delayed response!  I’ve logged your idea to override the Panel’s inheritance as an enhancement!  I’ll keep you updated on the issue.

For now, the best way is to manually override each child component’s font.

Best regards,

Levie

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.