Managing Fonts with Dark Theme Enabled

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 3 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
ClipperXTP
Posts: 55
Last visit: Thu Jun 24, 2021 3:05 am

Managing Fonts with Dark Theme Enabled

Post by ClipperXTP »

Hi
I have a GUI with radial buttons which enable / disable Groupbox depending on which option is chosen.
I have attached a JPG with a portion of the GUI displayed.
You will see the Groupbox text circled is displaying almost black on black when the groupbox has been disabled by the choice of radio button.
This repeats itself over the GUI as a whole, where other radio buttons have been chosen.
Aesthetically, this looks like the square has not been drawn properly and there is dead space. In fact, it is almost black on black text to background that is causing it to display this way.
Not the case with the text inside the the groupbox (Full Name, First Name etc) where the font has defaulted to silver/ grey.
Can you advise how I can set the default font for the Groupbox title to be the same colour as the checkbox labels within the disabled Groupbox?
Many thanks
GroupBox Font.JPG
GroupBox Font.JPG (43.82 KiB) Viewed 1879 times
User avatar
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: Managing Fonts with Dark Theme Enabled

Post by localpct »

Why not just copy and paste the already existing groupbox?
ClipperXTP
Posts: 55
Last visit: Thu Jun 24, 2021 3:05 am

Re: Managing Fonts with Dark Theme Enabled

Post by ClipperXTP »

Thanks for your suggestion but this is dynamic behavior.

The Groupbox is fine when it is enabled.

When the radial button sets $Groupbox1.enabled = $false so as to grey out its checkboxes etc, this is when the Groupbox title becomes unreadable.
User avatar
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: Managing Fonts with Dark Theme Enabled

Post by localpct »

Ah yes.. I had the same problem earlier with my build so I reverted back to the normal color as I didn't have time to mess with it
This topic is 3 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked