In my case, the checkbox needs to remain enabled to capture the mouse-down event, as this allows me to display a message box when it’s clicked. However, for the purpose of the program, the checkbox should appear visually disabled.
How can I achieve that? I was thinking about using styles, but adjusting the opacity doesn’t seem to work. By the way, I am using Web 1.
Hi,
You could place an empty canvas the size of the checkbox in front of the checkbox and intercept the mouse down event on the canvas.
When checkbox is enabled, just hide the canvas.
Doesn’t make sense to me (as a user, from a “how a GUI work” perspective).
Either a control is enabled, and clicking on the Checkbox might show some Message saying why that’s not allowed (and re-setting itself).
But likely I’d prefer it to be disabled (if the user shouldn’t be able to change it’s value). To show why, either display a small label with an explanation - or the checkbox shows a Tooltip/Helptag (which displays while hovering over it).
I just think it’s not a good idea to try/force a GUI to do something it’s not designed for… even if you can/could…
I use an info control (it’s a canvas that draws a ? and a circle) to indicate extra info available to the user. The user can mouse over for an instant tooltip, or sometimes click for useful links.