Page 1 of 1

Using code to maximise a window

Posted: Sat Nov 19, 2011 3:33 pm
by andyh1234
Is there a line of code that will force a stack to enter the 'maximised' window state?

I can set the stack to the full screen by using...

set the rect of this stack to the working screenRect

however, this puts the the menu bar is at the very top and the title bar is off the top of the screen on Windows.

If its possible just to send the stack a maximise command this would be easier!

Andy

Re: Using code to maximise a window

Posted: Sat Nov 19, 2011 7:01 pm
by BvG
There's no such thing in LC. You can use fullscreen, but of course that's not what you really want.

Now, that part of your stack is offscreen when you use the working screenrect sounds like a bug (as long as you don't have other resize code interfering of course). Also note that the working screenrect in the IDE is not the same as for standalones.

After testing the following code, I can replicate your problem in LC 5.0 on my Mac:

Code: Select all

set the rect of this stack to the working screenRect
I made a bug report.

Re: Using code to maximise a window

Posted: Sat Nov 19, 2011 11:07 pm
by andyh1234
Thanks, I didnt think of it as a bug as I guessed it might be neat to hide the title bar if the app were to be used in a kiosk style app, but then I would also set the app up with no title bar.

Ill add a vote on the bug report.

Thanks

Andy