I don’t know since when it doesn’t work, but it worked some times ago :
MyLabel.Enabled = False ’ Does not grayed the Label
Not a big problem, but I have a checkbox followed by a TextField followed by a Label and I would like to disabled all :
CheckBox "Launch every " + TextField “5” + Label “mn”
The “mn” stay dark and it look bad.
Edit : Sorry, Last Xojo version, Mac OS X “El Capitan”. Same problem in 32-bit and 64-bit
Xojo version, OS ?
Same here on El Capitan (last) / Xojo 2015r1
Apple had changed how disabled labels look: the same as enabled ones.
Has nothing to do with Xojo.
Maybe work around it with a canvas or textfield?
Maybe incorporate the label text into the checkbox text, something like “Launch interval in mins”. Then only have checkbox and textbox.
I replace the Label by a TextField ReadOnly without border, without focusRing and setting its BackDrop to &cFFFFFFFF (transparent) and it does it.
I forgot it but I added the possibility to click the Label to change hidden settings (with MouseDown and MouseUp). Then the Label looks Enabled but it’s not as the event MouseDown and MouseUp don’t fire (normal as it’s disabled).
You could also change textcolor to grey.
You’d be better off using the system colour for disabled text, it’s not always grey…
Or just stick with the system behaviour which is not to change their color at all when they are disabled
Indeed, disabled labels sounds very, very odd.
Not to Windows users. Windows applications routinely would “grey out” labels which were associated with controls like checkboxes or even text fields which were disabled. I had to get used to OSX not doing that as a visual clue.
I see it Apple’s way. Label isn’t an interactive control, therefore no need to have a “disabled” state.
It isn’t so much that the label itself is disabled (it has no such property, even in Windows) – it just gave an easy visual clue the associated control was disabled – even if that was an empty text box. I’m not necessarily arguing one way or the other. My point was that the “system behavior” is different on different systems. And thus so is the user expectation for people only accustomed to “their” way of doing things.
Apple used to have a disabled grey state (which I preferred).
The new way might make sense but is less obvious.