Jump to content

Font styles on disabled controls...


Recommended Posts

Why do these controls have text that is identical in appearance when enabled, but they differ when disabled?

#include <GuiConstants.au3>
GUICreate("test", 240, 120, 400, 200)
GUISetBkColor(0xCCCCFF)
GUISetFont(24, 600)
GUICtrlCreateCheckbox(" checkbox", 20,20)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel(" label", 40,60)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
Sleep(5000)
How do I trash the shadowing on the label?
Link to comment
Share on other sites

Maybe this for the label, I dont get the question though.

#include <GuiConstants.au3>
GUICreate("test", 240, 120, 400, 200)
GUISetBkColor(0xCCCCFF)
GUISetFont(24, 600)
GUICtrlCreateCheckbox(" checkbox", 20,20)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
GUICtrlCreateLabel(" label", 40,60)
Sleep(5000)
[Cheeky]Comment[/Cheeky]
Link to comment
Share on other sites

I'd like my disabled label to look the same as my disabled checkbox. They don't.

Neither control has shadowed text when enabled. They look the same.

But the label control gets a white 3D shadow when disabled, the checkbox does not.

(I added the background color and large font just to make the white shadow stand out, it is present with the default color as well)

I've tried messing with the styles but had no luck.

How do I get the disabled controls to look the same?

Edit: I tried this with other types of controls (input, button, radio, etc). It's only the label control that assumes a 3D appearance when disabled.

Edited by Spiff59
Link to comment
Share on other sites

I just wanted to use the $SS_NOTIFY event on some labels, and be able to disable them under some circumstances.

I'll just maintain a flag to remember their pseudo enabled/disabled state, and when they are "disabled", manually change their color to grey and ignore $SS_NOTIFY.

Link to comment
Share on other sites

  • 4 months later...

This is an easy one guys..

Make the checkbox 15 x 15 and use a label for the text on it

Then all will be labels/checkbox text will look similar when disabled

8)

Ah, true genius at work!! I was banging my head against the wall trying to change the text color of Radio Buttons to accommodate different background colors. Using adjacent labels fixed it up!! :D

Link to comment
Share on other sites

I seams to be the result of windows styles.

Running on my XP setup with 'Windows classic style' I get a white shadow, to give the sunken 3D effect, on both. If I change the setup to 'Windows XP style' or 'Media Center style' then only the white shadow to give the sunken 3D effect.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...