Scripting the creation of a button
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Scripting the creation of a button
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?
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Scripting the creation of a button
See the style and menuMode properties in the Dictionary.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Scripting the creation of a button
Yep, and "templatebutton"! 

Re: Scripting the creation of a button
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
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