View Full Version : button state (grey)

10 October 2009, 12:58 PM
I want to disable some button until some specific operation are done. Can I set button to grey?

The only way I ve found is to make it unvisible, but its confusing

btn_Blast.visible = not btn_Blast .visible

10 October 2009, 01:11 PM
I presume you are talking about a rollout and buttons you created in a script, if so then every control has the enable option. So
button.enable = false
button.enable = not button.enable
should grey out the control making, disabling it.


10 October 2009, 01:15 PM
you can do it like this which is more readable--

btn_Blast.visible = true //make it visible
btn_Blast.visible = false //make it invisible

btn_Blast.enabled = true //make it enable
btn_Blast.enabled = false //make it disable --- it is visible but will make it gray

10 October 2009, 01:41 PM
btn_Blast.enabled = false

Just what I wanted!!
Thank you guys!

CGTalk Moderation
10 October 2009, 01:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.