Jump to content

Recommended Posts

Posted

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?
Posted (edited)

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
Posted

I think thats a battle we cant win I looked all through the $styles and $extended styles cant find anything for that seems is does this even when you dont set any font attributes.. ^_^

[Cheeky]Comment[/Cheeky]
Posted

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.

Posted (edited)

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)

Edited by Valuater

NEWHeader1.png

  • 4 months later...
Posted

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

Posted

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

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
×
×
  • Create New...