Is it possible to specific kind of button?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rpanbwl
Posts: 5
Joined: Sun Oct 25, 2015 3:00 pm

Is it possible to specific kind of button?

Post by rpanbwl » Thu Oct 29, 2015 1:18 am

It looks like the command "new button" gives me a generic button. How can I create a new pop up menu via scripting?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Is it possible to specific kind of button?

Post by dunbarx » Thu Oct 29, 2015 2:19 am

Hi.

There is only one native button object. The difference is just the properties of each style.

So it would be tedious to modify all the required properties to change one style to another. The best way will one of two forms:

1- Set the properties of "the templateButton" to a pop-up you like. All new buttons will inherit that style. But should you want to create a button with a different style, you have to change the template on the fly. Not that this is particularly onerous. Do you know about the various object class templates?

2- Hide a pop-up you are in love with, and clone it. Rename "the last" button, and you are good to go.

Craig Newman

Post Reply