Events per state

I have several controls where I have a disabled state as well as an active state. When a control is disabled it should not do anything. My way of achieving this is by creating two widgets and showing one and hiding the other because I cannot have events linked to states. An event seems to be always active for all states. It would be very helpful if we could have events per state and not globally for an element.
Or is there another way which I have just been overlooking?

if the actions are triggered by events with with the mouse (click, down etc.), you can disable the Mouse Selection in the Disabled State:

If this property is disabled the cell does not react in pointer events. (Even in edit-mode!). Note that you have to disable it in on all cells, that is a cell inside the a cell without “Mouse Selection” still receives pointer events.

disabled.zip (245.2 KB)

image

1 Like

THANKS! I should really know that, I guess :slight_smile: