LC #42 Pipers Alley

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

07-22-2004, 11:56 PM
Lets say I have a simple window with a column layout and a button:

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

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


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

07-23-2004, 12: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.