PDA

View Full Version : button state (grey)


loran
10-14-2009, 01: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

JHN
10-14-2009, 02: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
or
button.enable = not button.enable
should grey out the control making, disabling it.

-Johan

bkravi
10-14-2009, 02: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

loran
10-14-2009, 02:41 PM
btn_Blast.enabled = false

Just what I wanted!!
Thank you guys!

CGTalk Moderation
10-14-2009, 02: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.