Multiple palette stacks

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
Summertime01
Posts: 11
Joined: Thu Aug 23, 2018 2:14 pm

Multiple palette stacks

Post by Summertime01 » Wed Oct 10, 2018 8:46 am

Hi all,

It's probably easy but I can't find out how to do it:
I've got a main stack and 2 substacks that I would like to open as palettes. I would like to allow for the user to see both palettes at the same time on top of the main stack (like with the tools palette and the project browser in livecode). What's a good way of doing that?

Thanks a lot for your help.

Summertime01
Posts: 11
Joined: Thu Aug 23, 2018 2:14 pm

Re: Multiple palette stacks

Post by Summertime01 » Wed Oct 10, 2018 8:57 am

PS:
It actually works sometimes but more "accidentally" or because of a mechanism/command I cannot really track.

I've got a button for each substack on the main stack. Pressing a button opens the respective stack. The preOpen stack handler in the substack's script defines it as palette.

I've noticed this behaviour:
action 1: When I click the button to open substack/palette 1 it opens.
action 2: When I then click the other button to open substack 2, substack 2 opens and substack 1 closes.
action 3: When I then click button 1 substack 1 opens.
action 4: When I then click button 2 substack 2 opens but substack 1 remains open as well.
Just seems to work in this sequence of actions. :roll:

Summertime01
Posts: 11
Joined: Thu Aug 23, 2018 2:14 pm

Re: Multiple palette stacks

Post by Summertime01 » Wed Oct 10, 2018 9:05 am

Correction:
Just found out that the second substack/palette is in the background but open.

What's the best way to have both substacks on top of the main stack?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6180
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Multiple palette stacks

Post by FourthWorld » Wed Oct 10, 2018 3:39 pm

What is the mode of the mainstack?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

bogs
Posts: 2312
Joined: Sat Feb 25, 2017 10:45 pm

Re: Multiple palette stacks

Post by bogs » Wed Oct 10, 2018 3:43 pm

Summertime01 wrote:
Wed Oct 10, 2018 9:05 am
What's the best way to have both substacks on top of the main stack?
I *think* what your looking for is this in your main stack :

Code: Select all

on openStack
// http://livecode.wikia.com/wiki/RaisePalettes
	set the raisePalettes to true
end openStack
Attachments
Selection_079.png
RaisePalettes above the main stack...
Image

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2253
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Multiple palette stacks

Post by jmburnod » Wed Oct 10, 2018 6:28 pm

Hi All
I played with 3 substacks and it works fine for me (LC 9.0.1)
I didn't find differences with raisepalettes true or false because there is only palette and edtable stacks.
Not sure I understand in which case raisepalettes could be useful
stBothPal.zip
(1.62 KiB) Downloaded 11 times
Best regards
Jean-Marc

Klaus
Posts: 10425
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Multiple palette stacks

Post by Klaus » Wed Oct 10, 2018 6:50 pm

On my Mac and Win "the raisepalettes" is TRUE by default, so maybe this is not the case on Linux?

bogs
Posts: 2312
Joined: Sat Feb 25, 2017 10:45 pm

Re: Multiple palette stacks

Post by bogs » Thu Oct 11, 2018 1:06 pm

Dunno, until I set raisePalettes in the openStack handler here (Linux, q4os TDE desktop), the palettes would go under the main stack. Once set, the palettes stayed above the main stack as shown in the picture. Didn't test on other Os platforms, so couldn't comment.
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”