Disabling a button in PAC Display Configurator


#1

So, I have a button I created (a circle that toggles red or green when clicked) that I want to only be clickable during certain times. Otherwise, it stays the color it was last when it isn’t clickable. I have not found a way to do this. Is there a way to? Making it invisible doesn’t help because then you can’t see whether the button is red or green.

Thanks.


#2

One solution might be to add two more buttons that are red and green with no output functions (not clickable). Then you could make the unclickable button (red or green) visible when clicking isn’t allowed, or make them invisible and show the clickable ones when clicking is allowed. You might need to use an Int32 in your strategy to determine which button to make visible at any time, since I don’t think there is way within PAC Display to AND or OR logical conditions.


#3

Actually, that’s roughly the solution I have right now, except I’m just using one other button. I just wanted to be able to have my solution use only one.


#4

The way I would handle this is with some ‘code behind’.
I would write a little logic behind the button in the strategy, it would have a flag and the flag (an int32) would be what I connect the button to, or the button color.

Its a common way to deal with user interfaces… All my strategies have a chart called ‘graphics’ for this very thing.