08-06-2011 07:30 PM - edited 08-06-2011 07:39 PM
I have this button:
which changes into this when pressed:
How do i programmatically make the button not change into its 2nd state when pressed? do i use property nodes? if so, how?
thanks
08-06-2011 08:59 PM
All you have to do is change the red color to be green as well, and the button will not appear to change states.
08-06-2011 09:28 PM
thanks for your reply, unfortunately there are other parts of my program that use that button where I need to keep the switching.
having said that, is it possible to programmatically not change the buttons 'physical' state when pressed?
thanks
08-06-2011 09:36 PM
If you use the Colors Property Node, you can change the colors dynamically, so you can set it all green when you need it, then change it back to green and red.
The only way you can intercept the button press is to use the Mouse Down? event in the event structure. You will need to verify a left mouse click and then Discard the event. That will be your inidcation the button has been pressed. However, you will still need to track your state to not discard the event in the situations where you want the button to actuate.
It is much easier to dynamically change the colors.
08-06-2011 10:32 PM
08-07-2011 12:35 PM
If you don't want the button to activate (i.e. you won't know that someone tried to press it, what Darin stated is the way to go. You either disable it (I prefer to grey it out as well) with the Disabled property or you can hide it with the Visible porperty. I understood that you still needed to know the operator pressed the button. If that is the case, then neither of these will work, as the button is not pressable.
08-07-2011 02:34 PM