Page 1 of 1

Scripting the creation of a button

Posted: Tue Nov 10, 2015 10:40 pm
by rpanbwl
I figured out how to create a button with the create button command, but how do I create a specific type of button like a popup menu?

Re: Scripting the creation of a button

Posted: Tue Nov 10, 2015 10:48 pm
by FourthWorld
See the style and menuMode properties in the Dictionary.

Re: Scripting the creation of a button

Posted: Wed Nov 11, 2015 12:02 am
by Klaus
Yep, and "templatebutton"! :D

Re: Scripting the creation of a button

Posted: Mon Nov 16, 2015 8:43 pm
by dunbarx
Hi.

What Richard and Klaus said.

But there are several properties distinguishing each button style, (and that is apart from the layer, name, etc., which are different as a matter of course, not as a matter of, er, style) when they are created, so it may be tedious to manage these. And there is only one templateButton, though you might use it as best you can.

So I suggest making a button for each of the styles you intend, and hiding them. Then when you want a new one of whatever type, simply clone one from stock. You still have to manage the name, etc.

Craig Newman