Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
frankdeprins is currently offline  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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Go to previous messageGo to next message
frankdeprins is currently offline  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 295 times)

[Updated on: Thu, 09 December 2010 14:53]

Report message to a moderator

Re: Label box has no disabled look [message #30115 is a reply to message #30113] Thu, 09 December 2010 17:57 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

I completely forgot about the buddy control feature... I guess I just have to admit you are right then Rolling Eyes

And if it is standard behavior of common applications, then we sure should follow the same pattern.

Honza

[Updated on: Thu, 09 December 2010 17:58]

Report message to a moderator

Re: Label box has no disabled look [message #30385 is a reply to message #30115] Mon, 27 December 2010 13:10 Go to previous message
mirek is currently offline  mirek
Messages: 13986
Registered: November 2005
Ultimate Member
Resolved.

Mirek
Previous Topic: public Ctrl in my class - param in constructor problem
Next Topic: Accessing printer properties
Goto Forum:
  


Current Time: Fri Jun 21 21:38:32 CEST 2024

Total time taken to generate the page: 0.01295 seconds