Maximizing a stack/window

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
gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

Maximizing a stack/window

Post by gwbasic » Sat Aug 28, 2010 5:39 am

Newbie here. I'm looking for a way to open a stack as maximized window. Please help.

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: Maximizing a stack/window

Post by Dixie » Sat Aug 28, 2010 8:16 am

Hi...

Code: Select all

on preOpenStack
  set the rect of this stack to screenRect()
end preOpenStack
be well

Dixie

gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

Re: Maximizing a stack/window

Post by gwbasic » Tue Aug 31, 2010 9:49 am

On windows xp, the title bar mimize, restore, exit buttons are missing. how do i make it appear again?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: Maximizing a stack/window

Post by Janschenkel » Tue Aug 31, 2010 8:39 pm

Did you change the decorations of the stack by any chance?

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

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

Re: Maximizing a stack/window

Post by Klaus » Tue Aug 31, 2010 9:11 pm

Hi gwbasic,

a stacks rect is actually the rect WITHOUT the title bar.
So in your case the titlebar and all its decorations are "out of reach"!

Type this in the message box:
set the rect of stack "name of your stackhere" to 50,50,200,200
To be able to "handle" it again :D

I think the height of the titelbar is about 30 pixels (?) on Windows, so you have to ADD this value from "item 2 of the screenrect" like this:

Code: Select all

on preOpenStack
  put the screenrect into TSR
  add 30 to item 2 of TSR
  set the rect of this stack to TSR
end preOpenStack
You might want to play a bit with the values unti it fits your needs.


Best

Klaus

gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

Re: Maximizing a stack/window

Post by gwbasic » Wed Sep 01, 2010 12:56 am

Thanks.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”