Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Label box has no disabled look
Label box has no disabled look [message #30106] |
Thu, 09 December 2010 12:56 |
frankdeprins
Messages: 99 Registered: September 2008 Location: Antwerp - Belgium
|
Member |
|
|
Hello,
When a labelbox is disabled, the text does not get the disabled text color. You simply cannot see it is disabled.
I stepped a bit through the sources and, to my humble knowledge, the best way to fix this is change the labelbox constructor to:
LabelBox::LabelBox()
{
SetInk(Color(Null));
SetVAlign(ALIGN_TOP);
}
|
|
|
Re: Label box has no disabled look [message #30109 is a reply to message #30106] |
Thu, 09 December 2010 13:44 |
|
Hi Frank,
I think that the current implementation is correct. Enable/Disable should IMHO take visible effect only on "active widgets", that actually do something (buttons, radios, scrollbars, menus,...). The "passive widgets" (e.g. LabelBox, StaticRect, Label, RichTextCtrl,...) do their job just by being placed somewhere, so if you disable them (you can think of it as prohibiting user interaction), they still do the same so no change in visual appearance is necessary to indicate that. Actually the only reason why they have Enable/Disable methods is because they inherited it from Ctrl.
Best regards,
Honza
|
|
|
Re: Label box has no disabled look [message #30113 is a reply to message #30109] |
Thu, 09 December 2010 14:44 |
frankdeprins
Messages: 99 Registered: September 2008 Location: Antwerp - Belgium
|
Member |
|
|
Not quite; a label can also act as a buddy for an active (edit) control. When you press the hotkey of the label, the focus goes to the edit control. So, it makes sense to show it disabled.
Besides; in Windows, static controls such as labels and (text labels of) group boxes follow the convention of being in a disabled color when they are disabled (I just tested this out in Visual Studio with a small dot net app). So I think, at least on Windows, we should follow this convention.
-
Attachment: disabled.png
(Size: 17.46KB, Downloaded 285 times)
[Updated on: Thu, 09 December 2010 14:53] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Thu Mar 28 18:15:54 CET 2024
Total time taken to generate the page: 0.00957 seconds
|