Stack Style Property

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
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Stack Style Property

Post by phaworth » Sat Aug 08, 2009 7:06 am

I read in the manual that windows in a stack with specific style property are always opened in that style. Trouble is, I don;t see a setting in the stack property inspector to set the style. Does that have to be done through a script?
Pete

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Stack Style Property

Post by jmburnod » Sat Aug 08, 2009 10:49 am

Hi,

Yes, there is not a style setting in the stack property inspector
But you can set the style of a stack by script

Code: Select all

set the style of stack MyStack to MyStyle
The style of a stack determines its behavior and is one of the following:
* topLevel: editable window
* modeless: modeless dialog box, cannot be edited, can use only Browse tool
* modal: modal dialog box, can use only Browse tool
* palette: palette window, cannot be resized or edited, can use only Browse tool

It is a good idea have a btn to change the style (if the style = modal you can't access to the msg box and script editor)

All the best

Jean-Marc

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Post by phaworth » Sat Aug 08, 2009 5:33 pm

Thanks for the info. If I set the style by script, is the setting permanent? In other words, If I quit Revolution and then run it again, will the style still be what I set it to previously?
Thanks,
Pete

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat Aug 08, 2009 9:22 pm

Pete,
If I set the style by script, is the setting permanent? In other words, If I quit Revolution and then run it again, will the style still be what I set it to previously?
I have set the parts of your question to bold that could lead to an answer. :)

regards
Bernd

PS, could not resist, just joking.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10050
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Sat Aug 08, 2009 9:50 pm

The style property for stacks governs the default behavior of that stack when it's opened using the "open" or "go" commands.

But keep in mind that the values used for the style property ("toplevel", "modal", "modeless", "palette") are also commands themselves, which override the default behavior to open the stack in the specified mode.

For example, if you have a stack whose style is "palette", using this would open the stack as a palette:

open stack "MyStack"

But using this would open it as topLevel:

toplevel stack "MyStack"
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Post by phaworth » Sat Aug 08, 2009 10:28 pm

Thanks everyone. I think I have the info I need now.
Pete

Post Reply