Transitioning between substacks

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
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Transitioning between substacks

Post by montymay » Wed Sep 07, 2016 8:15 am

My application consists of one mainstack that is without decorations and is full screen, at the top of which are two rows of buttons with which to navigate to a substack corresponding to each button. Each substack, also without decorations, is the same size as the mainstack except for the area occupied by the two rows of buttons of the mainstack. Below is a picture of the mainstack window before the any substack is opened, the boundaries of which are marked by the red rectangle.


After I open the application, clicking the first button opens the intended substack without problem. But when I press down on any button, the window for the substack disappears and the entire window of the mainstack appears. When I release the mouse button, the targeted substack window then appears. (There is no mousedown handler in my scripts.)

I want to go directly from one substack to another substack without the mainstack window appearing. From reading other posts I understand that lock screen does not work when transitioning between substacks, but various experiments on my own have failed to find the solution. Thank your for any suggestions.

Monty
Attachments
DB screenshot.JPG

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

Re: Transitioning between substacks

Post by jmburnod » Wed Sep 07, 2016 9:47 am

Hi Monty
If I understand you corectly you want that only btns of the mainstack are visible when you open a substack.
Why not resize the main stack when you open/close a substack ?

Edit:
I wonder if you really need a main stack larger than the btns row. If not you can use a substack to display the part below the btns row.

Best regards
Jean-Marc
https://alternatic.ch

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

Re: Transitioning between substacks

Post by dunbarx » Wed Sep 07, 2016 2:28 pm

Montymay.

When you click on the button area of the mainstack, which is behind the substack, that stack comes to the front; it becomes the topStack. There is no way to access the button area of the mainstack without this.

So do you see what Jean-Marc is saying about having the mainstack just be the button area? It would still come to the front, but would not "cover" the substack.

How about making the mainstack a palette that floats above everything? Or perhaps you do not need substacks at all? Do they contain more than one card each? You could have a single stack with the button area a background group if so.

Craig Newman

montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Re: Transitioning between substacks

Post by montymay » Thu Sep 08, 2016 7:37 am

Hello Craig and Jean-Marc,

Thank you for your responses. Following your suggestion, I resized my mainstack from fullscreen (1920 x 980) to 1920 x 60 pixels so that each of my substacks appears below the mainstack. My mainstack script successfully opens one of the substacks.

But the problem now is that I must click twice on a button to open another substack. After the first click, the initially displayed substack remains displayed. If the targeted unopened substack were already open but behind the displayed substack, a single click would bring it to the front. Therefore, it seems as though my initializing mainstack script needs to open all the substacks in order for the single clicks to take the user smoothly from substack to substack. However, I don't know how to hide this process. Again, lock screen does not work.

If the solution is readily apparent, your further suggestions or explanation would be much appreciated.

Monty
Last edited by montymay on Thu Sep 08, 2016 11:01 pm, edited 1 time in total.

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

Re: Transitioning between substacks

Post by jmburnod » Thu Sep 08, 2016 11:17 am

Hi Monty,
Here is a stack builded like this
One main stack where is only a navigation bar and 4 substacks. the first is open at preopenstack
As Craig's suggested, main stack is a palette. If you have to modify it, you may use

Code: Select all

toplevel stack stOpenSubTest
and

Code: Select all

palette stack stOpenSubTest
Best
Attachments
stOpenSubTest001.zip
(1.63 KiB) Downloaded 240 times
https://alternatic.ch

Post Reply