View Full Version : Button Command

06 June 2007, 03:06 PM
Quick question:

How can you make a proc/global proc the command of a button for a windows interface?

Sick Spider
06 June 2007, 11:47 PM
There u go:
The button mane is "myButton" and the flag "-c" is the command it runs when pressed.

window -width 150;
columnLayout -adjustableColumn true;
button -label "Default" -c "sayHi" "myButton";

global proc sayHi()
print "\nhi\n";

06 June 2007, 05:15 PM
Thanks a bunch, Sick Spider

CGTalk Moderation
06 June 2007, 05:15 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.