template stacks

Klaus major-k klaus at major-k.de
Fri Jul 28 05:50:30 EDT 2017

Hi Richmond,

> Am 28.07.2017 um 11:30 schrieb Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
> From LiveCode 8.0 upwards when one wants a new stack one is given a menu
> of choices for iPads, iPhones and so on.
> Is there a way to edit that menu PERMANENTLY so one
> can accommodate one's own sizes?

not permanently, since this will be gone with every new version of LC.

But why not create a plug-in? Nothing easier that that:
Create a stack
Add a pulldown menu (or whtever menu-button you like)
Put this into the menuitems (text of button)
etc. for all wanted sizes, you get the picture

And this is the script for that menubutton:

on menupick which
set the width of the templatestack to item 1 of which
set the height of the templatestack to item 2 of which

##set the loc of the templatestack to the screenloc

## Set some important props first:
set the alwaysbuffer of the templatestack to TRUE
set the destroystack of the templatestack to TRUE
set the destroywindow of the templatestack to TRUE
set the resizable of the templatestack to TRUE
create stack

## Always clean up!
reset the templatestack
end menupick

Put it into you LC plugin folder and that's it! :-)

> Richmond.



Klaus Major
klaus at major-k.de

More information about the Use-livecode mailing list