Making big stacks take the top-bar's place

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

FESEFW
Posts: 11
Joined: Sun Sep 06, 2020 4:58 pm

Making big stacks take the top-bar's place

Post by FESEFW » Wed Jan 25, 2023 10:06 am

Hello!

I've been making apps and games in LiveCode since 2019.

Since the very first day, I've noticed that when I tried to create stacks that are almost fullscreen,
the top-bar would be hidden, and it made me re-open the top-bar every 10 seconds.

Therefore, I haven't made 'almost-fullscreen' apps or games since then.
But, I've now decided that I do want to make one.

Is there any way in the settings or something to make it not disappear?

Thanks!

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

Re: Making big stacks take the top-bar's place

Post by Klaus » Wed Jan 25, 2023 10:26 am

Hi FESEFW,

I presume you are on a Mac, right?
You can check the screenrect and also -> the working screenrect
The latter returns the dimension of your screen MINUS the Mac menubar at top and MINUS the Mac dock at the bottom.

Example:
I use a 27" screen and get these values
the screenrect -> 0,0,2560,1440
the working screenrect -> 0,25,2560,1376

If your stack has decorations, the window title bar is also about 24 pixel (or 26? Not sure) in height.
So if you do some calculations you will get the dimensions to set your stack to, know what I mean?

If you have more questions, just ask!


Best

Klaus

FESEFW
Posts: 11
Joined: Sun Sep 06, 2020 4:58 pm

Re: Making big stacks take the top-bar's place

Post by FESEFW » Wed Jan 25, 2023 11:40 am

Hi Klaus!

Thanks for your quick answer.

I am using a 27" screen. I am using Windows 10.

Could you detail a bit more? I basically want to be able to edit a stack that takes the top-bar's place without the top-bar disappearing once I click on the stack.

Thanks.

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

Re: Making big stacks take the top-bar's place

Post by Klaus » Wed Jan 25, 2023 12:16 pm

Please tell me first what a "top bar" is on Windows?
Did you place your taskbar at the top of your monitor?
Or do you mean the title bar of a window, see screenshot?
window_title.png
window_title.png (10.05 KiB) Viewed 2361 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making big stacks take the top-bar's place

Post by dunbarx » Wed Jan 25, 2023 7:13 pm

Are we talking about the toolbar?

Likely not pertinent, but on a Mac, any window in LC will cover the toolbar. That gadget is just a stack. Can it be set to act as a palette? I tried it and got poor results.

Craig

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

Re: Making big stacks take the top-bar's place

Post by Klaus » Wed Jan 25, 2023 7:20 pm

dunbarx wrote:
Wed Jan 25, 2023 7:13 pm
Are we talking about the toolbar?
Not sure, that's why I was asking.

FESEFW
Posts: 11
Joined: Sun Sep 06, 2020 4:58 pm

Re: Making big stacks take the top-bar's place

Post by FESEFW » Thu Jan 26, 2023 7:44 am

I am not sure how to explain..

When opening LiveCode, there is the toolbar on the left, and a bar a bit above and a bit right.

Big stacks hide that bar and make me re-open it every time from the Windows taskbar.

I haven't put the Windows taskbar on top of the screen.

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

Re: Making big stacks take the top-bar's place

Post by Klaus » Thu Jan 26, 2023 10:37 am

AHA! We are talking about the LC TOOLBAR! :-)
The stacks name is "revMenuBar".

OK, since this is just a stack (= window) it will be covered by other stacks/windows if they are placed in front of it.
Maybe what Craig wrote will work for you?
That gadget is just a stack. Can it be set to act as a palette? I tried it and got poor results.
Try to set it to "palette" with the message box:

Code: Select all

palette "revMenuBar"
If that will cause problem of any kind, revert it again with the message box:

Code: Select all

toplevel "revMenuBar"

FESEFW
Posts: 11
Joined: Sun Sep 06, 2020 4:58 pm

Re: Making big stacks take the top-bar's place

Post by FESEFW » Thu Jan 26, 2023 1:37 pm

Thank you so much!

That solved that problem, but created another problem that doesn't fix itself even with reverting (toplevel).

"revMenuBar" becomes smaller and hides all the buttons. I get an error in the messageBox when entering 'palette "revMenuBar"':
'Error description: stack is locked (cantModify)'.

What should I change for that to work properly?

Thanks!

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

Re: Making big stacks take the top-bar's place

Post by Klaus » Thu Jan 26, 2023 2:07 pm

Ah, OK, try this in the message box:

Code: Select all

set the cantmodify of stack "revMenuBar" to FALSE;palette "revMenuBar"
You can use the SEMICOLON ; to enter more than one command in the (one line) message box.

Be aware that we probably cannot save the IDE stacks, so you may need to do this every time you start up LC.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making big stacks take the top-bar's place

Post by dunbarx » Thu Jan 26, 2023 2:59 pm

Klaus.

That is what I meant by "poor results". The IDE stacks will not pay attention to any modifications between sessions.

Interestingly, on a Mac, if i do NOT clear cantModify, the stack increases in height and none of the controls appear. Cannot be undone without quitting LC. I get a simple white rectangle, and a notification of an error, saying that the stack "revmenubar" is locked. I get that part, but what about the fat empty stack itself?

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making big stacks take the top-bar's place

Post by dunbarx » Thu Jan 26, 2023 3:00 pm

Likely just a feature of IDE stacks. Don't mess with them without expecting trouble.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making big stacks take the top-bar's place

Post by dunbarx » Thu Jan 26, 2023 3:04 pm

FESEFW.

This is really a minor problem. You can always create a plug-in or any other gadget that will set those toolbar properties (that is what we call it) upon LC startup.

Craig

grzkmo
Posts: 8
Joined: Thu Aug 07, 2008 9:50 am

Re: Making big stacks take the top-bar's place

Post by grzkmo » Thu Jan 26, 2023 4:11 pm

An idea:
You can zoom your stack with the stack's scaleFactor property (either in the message box: set the scaleFactor of stack "YourStack" to 0.92 or in the property inspector)
This doesn't change the actual height and width of your stack, it just zooms the view so the entire window fits under the Livecode toolbar.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Making big stacks take the top-bar's place

Post by dunbarx » Thu Jan 26, 2023 6:08 pm

@grzkmo

For purely visual display, the "scaleFactor" does a great job. But it does not change the "actual" properties of a stack window, such as the top, height, even the rect. It is thus not possible to do something I tried long ago, to adjust that property continuously under script control until the rect of the window attained certain limits.

I am not sure why it does not, though it obviously uses special internal display gadgetry.

@FESEFW. But it is an interesting idea. You could change the rect proportionately and continuously, keeping track of all the sides, adjusting them as you grow so that the loc "sort of" stays constant, and they cease that growing when both the top reaches the top and the bottom reaches the bottom.

Unlike the scaleFactor, the controls do not concurrently change their "size". But I think you likely do not want that anyway.

A fun thing...

Craig

Post Reply

Return to “Talking LiveCode”