PDA

View Full Version : Button Command


RavenEye
06-05-2007, 04:06 PM
Quick question:

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

Sick Spider
06-06-2007, 12:47 AM
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";
showWindow;

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

RavenEye
06-06-2007, 06:15 PM
Thanks a bunch, Sick Spider

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