Determine if stack is maximized?

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Determine if stack is maximized?

Post by Garrett »

Rev 2.6.1

Greetings,

How do you find out if a stack is maximized? I found how to determine
if it's been minimized(or iconified) by checking for "mode" 12, but there
is no "mode" for maximized.

Does anyone know of a way to determine if the stack is maximized?

Thanks in advance,
-Garrett
malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte »

Hi Garrett,

try:

Code: Select all

if the iconic of this stack is false then 
  put "stack is maximized"
end if 

All the best,

Malte
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett »

Hi Malte,

Thanks but that won't work either. If iconic is false, it just means that the
stack isn't minimized, not that it's maximized.

If it's not minimized, it could be maximized, or in it's normal state.

-Garrett
BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG »

I think there is no way to query that in rr...
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10104
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Determine if stack is maximized?

Post by FourthWorld »

Garrett wrote:How do you find out if a stack is maximized?
Wouldn't the maximized rect be the same as the windowBoundingRect?
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett »

Hi Richard,

I don't know, but I'll definitely check it out.

Thanks :-)
-Garrett
Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Re: Determine if stack is maximized?

Post by Garrett »

FourthWorld wrote:
Garrett wrote:How do you find out if a stack is maximized?
Wouldn't the maximized rect be the same as the windowBoundingRect?
Gave it a try. Here's the results when I maximized the stack on OS X:

Stack Rect: 10,48,1270,939
BoundRect: 0 ,22,1280,949

on Windows XP:

Stack Rect: 0,19,1280,740
BoundRect: 0 , 0,1280,740

On Windows XP at least the width and height match the boundingrect
with and height. But on OS X the numbers fall shy of about 10 pixels
each. And the stack reflects this also as it does not maximize to touch
the menu bar, Dock or sides of the desktop.

Odd, and not reliable I think for testing the maximize situation :-(

At least in Windows I could use an api to test this, but I have no clue if
OS X has an api for this, and even if it does, I have no clue how to call
external api calls from the OS itself from Rev.

I also browsed the docs to see if there was a way to find out if the Max/
Zoom box is being pressed, but no message seems to exist for this
either :-(

Thanks,
-Garrett
mcgrath3
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 149
Joined: Thu Feb 23, 2006 8:49 pm
Contact:

Post by mcgrath3 »

Garrett,

On the mac you are getting the difference between the menu tool bar and the full screen size available. This is reliable.

On windows you are getting the start bar.

Tom
Tom McGrath III
Lazy River Software
3mcgrath@comcast.net
Post Reply