PDA

View Full Version : How to make a button create another button.


kiaran
07-23-2004, 12:56 AM
Lets say I have a simple window with a column layout and a button:


string $window = `window`;
columnLayout;
button -label "Make another button";
showWindow $window;


I want the button to create another button when it's clicked. Any ideas?

Thanks,
Kiaran

wrend
07-23-2004, 01:26 AM
name the columnLayout or collect its name and then in the command of the button, add a button to that named layout ..so just the same as the existing button command, but do a -parent $collumnLayoutName.

kiaran
07-23-2004, 01:54 AM
Eureka! The -parent flag.

Why do I always look for the hard way first? Hehe, thanks wrend.

CGTalk Moderation
01-18-2006, 08:00 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.