Set the fullscreenmode of me to "ExactFit" has no effect.

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: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Tue Jan 23, 2024 4:27 pm

Hi all,
Just bought a new laptop and transferring my project over from the old desktop. I coded 'Set the fullscreenmode of me to "ExactFit" ' in the stack code, between OnPreOpenStack and EndPreopenstack. It has had no effect on any card in the stack. Both machines are Windows 10, and everything else works fine. Any ideas ?

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by SparkOut » Tue Jan 23, 2024 4:37 pm

Presumably that's a typo and you mean

Code: Select all

on preOpenStack
  set the fullscreenmode of me to "exactFit"
 end preOpenStack 
with a space between "on/end" and "preOpenStack" - otherwise it looks ok

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

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by Klaus » Tue Jan 23, 2024 4:38 pm

Hi CAsba,

only on the mobile platform a stack will automatically set to "fullscreen"
and only THEN the "fullscreenmode" will take effect.

If in doubt ALWAYS read up the dictionary 8) , which will probably shed some
light on the problem. Here the relevant part:
------------------------------------------------------
Note: The fullscreenmode only takes affect when a stack is full screen.
This is the case on mobile platforms where stacks are always full screen,
or on the desktop when the fullscreen property of the stack is set to true.
----------------------------------------------------
Is this the case with your stack(s)?


Best

Klaus

CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Tue Jan 23, 2024 5:08 pm

Thanks for that Klaus. It seems that I need to look into this a bit closer as setting the fullscreen property had two unforeseen effects:
1, the objects were 'stretched' hoizontally, not too much of a problem, but not 'squashed' vertically, so the full length of the card wasn't
visible;
2, the header menu disappeared and I had nbo way to retrieve it !
I obviously need to 'play' with it a bit !

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

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by Klaus » Tue Jan 23, 2024 5:47 pm

Setting the "fullscreenmode" of a stack to true will resize the stack to the screenrect.
However if the aspect ratio of the stack (w/h) is not equal to the aspect ratio of the monitor,
then the stack will get unproportinally distorted! This is what you experienced.

So you will need to set the aspect ratio of your stack first to the one of the monitor, then set
the "fullscreenmode" and "fullscreen" and everything will look great.

There is no other way to "serve" all possible devices and that is the main problem on the mobile platform
which needs to take care of by the developer.

CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Thu Jan 25, 2024 1:47 pm

Hi Klaus and Sparkout, thanks for that.
I do indeed want my project to 'serve' users with all sizes of monitors, desktop and laptop (but not mobiles). Klaus, do I understand you correctly that the user must make adjustments to fit the project to his screen ? Or can this be done programmatically by getting the screen dimensions and adjusting to them ?

CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Thu Jan 25, 2024 1:50 pm

Klaus, I forgot to mention, I have the fullscreenmode set to Letterbox, so no distortion, but the size of the stack is the same on the bigger screen on my desktop as the smaller screen on the laptop.

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

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by Klaus » Thu Jan 25, 2024 2:23 pm

but the size of the stack is the same on the bigger screen on my desktop as the smaller screen on the laptop.
Do you mean the height and width as the inspector shows or the visual representation of the stack on your monitor?

Just tested and the height/width of the stack remains untouched, so it is more a "virtual" scaling.
But the visual representation is as advertized!

CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Thu Jan 25, 2024 2:49 pm

It's the height and width as the inspector shows. So what was OK on the laptop shows lots of unused screen space on the desktop.
What do you mean, 'the visual representation is as advertized!'
What can I do to ensure that all sizes of screen will get a fair representation of it ?

CAsba
Posts: 364
Joined: Fri Sep 30, 2022 12:11 pm

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by CAsba » Thu Jan 25, 2024 3:19 pm

Hi Klaus,
Don't ask me how, but - it's all working fine now. It adapts its size to the current screen. Many thanks for your help.

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

Re: Set the fullscreenmode of me to "ExactFit" has no effect.

Post by Klaus » Thu Jan 25, 2024 3:27 pm

Hi CAsba,

HOW? :D

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”