(OFFLIST) Need Help Resizing windows

Ken Norris pixelbird at interisland.net
Sat Nov 8 15:04:02 EST 2003


Hi Tom,
Note : This is offlist.

> Date: Sat, 8 Nov 2003 04:35:50 -0500
> From: Thomas J McGrath III <3mcgrath at adelphia.net>
> Subject: Re: Need Help Resizing windows
> 
> Ken,
> 
> Wouldn't this count for a feature in REV. You know something like "Full
> Screen 800x600" or "Menu Screen 800 x 600" etc.
----------
Nope, huh-uh...it's a cross-platform issue. Windows menubars are at the top
of the  windows, not at the top of the screen like MacOS' are. If you
notice, the menubar under Rev on a Mac is an emulation, they're actually
specialized buttons. Most Mac apps used to allow you to toggle the menubar
off and on via 'cmd/space', but you'll see this doesn't happen in Rev. You
actually have to script it. It's a little different in OSX, but the issue is
the same.

The menubar is 16 pixels high.
----------
> PS My mailbox filled and I missed the response from Jacque and any
> others. Were there many?
----------
Here is Jacque's post in it's entirety:

=========================================================

Message: 3
Date: Fri, 07 Nov 2003 12:49:23 -0600
From: "J. Landman Gay" <jacque at hyperactivesw.com>
Subject: Re: Need Help Resizing windows
To: How to use Revolution <use-revolution at lists.runrev.com>
Message-ID: <3FABE933.5080700 at hyperactivesw.com>
Content-Type: text/plain; charset=us-ascii; format=flowed

On 11/7/03 9:48 AM, Thomas J McGrath III wrote:

> Hello Revies,
> 
> I set the resizable of the main stack to false by selecting the check
> box in property inspector. I set the stack size to 800 x 600 on my
> 1280x854 PBG4.
> However, when I open my standalone on other OSX at 800 x 600  part of
> the window is offscreen the UIBar is in the way AND the window does
> resize. Items move over to the new window size from geometry pane but
> window should not resize.
> Is this a bug with resizing?
> I made the windows 800x600 thinking that it is a good standard to build
> with. But the window does not work on an 800x600 display.
> What gives? Has this been documented?

Your stack needs to account for the space used by the menu bar and the
dock. If the screen resolution is 800x600 then the actual available room
on screen for the stack will be less. See the windowBoundingRect
property for information about the available screen space for a stack.
The windowBoundingRect is set by default to the amount of space that is
left after various OS interface elements are accounted for. You can
reset that property, but on a Mac the menu bar will always take up some
real estate, and so will the dock. I imagine what you are seeing is Rev
trying to accomodate these items while still displaying as much of your
stack as possible.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

=========================================================

(cont'd)

FYI, Jacque's site has more on the subject under HC conversion/Rev Tutorial:
<http://www.hyperactivesw.com/Resources.html>

1) Download the tutorial and then access the set.

2) From the Table of Contents click on "About Revolution Menus".

3) You'll see an article about menus at the top of the list. From it, you
should be able to get your head wrapped around the methods.

> Because I have to
> actually account for the decorations and the menu bar. When actually I
> wanted this window to fit under the menu bar.
----------
Well, of course, a monitor's maximum screen size isn't negotiable, so if you
want to display a normal Mac window, you have to compensate. AFAIK, all Mac
apps are this way. That means you have to size your window to fit. On Win 32
apps, the windows contain the menubar, so the window size fits the screen
You still have to deal with content, though.

Here are some other posts on a related subject (window titlebars), the first
from Graham Samuel and the second is a Re to it from Ken Ray:

=========================================================

Leaving room for the title bar
Graham Samuel livfoss at blueyonder.co.uk
Sun Sep 21 13:17:01 EDT 2003

    * Previous message: QT Player only?
    * Next message: Leaving room for the title bar
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Well, I seem to be talking to myself, but this may interest some
people. Apologies if it's all in the dox somewhere and I've missed it
(wouldn't be the first time). I have managed to get hold of various
machines and I think the following figures are correct about the
amount of space in pixels taken up by the decorations in each case.
Obviously I don't have a more general solution which will work when
Microsoft or Apple change something. I have no Unix figures.

The following is best viewed in a monospaced font:

    OS        Platform  SystemVersion  Title Bar LeftSide RightSide Bottom

Windows 95    Win32       4.0            24        4        4        4
Windows 98    Win32       4.10           24        4        4        4
Windows XP    Win32       NT 5.1         30        4        4        4
Mac OS 9      MacOS       9.2.2          22        6        7        6
Mac OS X      MacOS       10.2.6         22        1        1        1

I'm hoping that these figures enable the developer to use the default
WindowBoundingRect to set a new, more restrictive WindowBoundingRect
to ensure a stack window just fills the available screen space.

Corrections and comments welcome

Graham

-- 
-------------------------------------------------------------------
          Graham Samuel / The Living Fossil Co. / UK & France

======================================================

from Ken Ray:

======================================================


Leaving room for the title bar
Ken Ray kray at sonsothunder.com
Sun Sep 21 17:42:00 EDT 2003

    * Previous message: Leaving room for the title bar
    * Next message: A practical tale of hacking with Revolution
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Graham,

You're not talking to yourself, but I think that most people that wanted
to use up the full space of the screen have gone the route of hiding the
menubar and making a "decorations empty" full-screen stack based on the
screenRect. Or alternately, have opened a window with decorations to a
smaller-than-screen-size window, and allow the user to maximize it,
resizing it accordingly.

However, based on your table below, the only thing I'd mention is that
in Windows you can change the title bar height to anything you like in
the Display control panel (Appearance Tab (you'll need to click on the
"Advanced" button in WinXP) and select "Active Title Bar" from the drop
down menu.

Your settings look like they're correct, but take note that the number
of pixels for the title bar in Windows does not match the setting in the
Display control panel. For example, in Win XP, the height is shown as
"25" in the control panel. You should be able to query

  HKEY_CURRENT_USER/Control Panel/Desktop/WindowMetrics/CaptionHeight

and take the value there and divide it by 15 and get the absoulte value.
For example, on my PC, the default of 25 pixels is displayed as -375 in
the CaptionHeight key in the Registry (abs(-375/15) = 25), and when I
changed it to 35 pixels, the CaptionHeight went to -525 (abs(-525/15) =
35). You can then take that and add 5 pixels to get the "true" size (30
for the default in this case).

Also, resizing the titlebar height also changes the height of the Task
Bar at the bottom of the screen too...

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ > -----Original Message-----
> From: use-revolution-admin at lists.runrev.com > [mailto:use-revolution-admin
at lists.runrev.com] On Behalf Of
> Graham Samuel
> Sent: Sunday, September 21, 2003 12:11 PM
> To: Revolution user discussion
> Subject: Re: Leaving room for the title bar
> > > Well, I seem to be talking to myself, but this may interest some
> people. Apologies if it's all in the dox somewhere and I've missed it
> (wouldn't be the first time). I have managed to get hold of various
> machines and I think the following figures are correct about the
> amount of space in pixels taken up by the decorations in each case.
> Obviously I don't have a more general solution which will work when
> Microsoft or Apple change something. I have no Unix figures.
> > The following is best viewed in a monospaced font:
> OS       Platform  SystemVersion  Title Bar LeftSide  RightSide Bottom
> Windows 95   Win32       4.0            24          4            4          4
> Windows 98   Win32       4.10           24         4            4          4
> Windows XP   Win32       NT 5.1        30          4            4         4
> Mac OS 9      MacOS       9.2.2          22           6          7          6
> Mac OS X      MacOS       10.2.6         22          1           1          1
>  I'm hoping that these figures enable the developer to use the default
> WindowBoundingRect to set a new, more restrictive WindowBoundingRect
> to ensure a stack window just fills the available screen space.
> Corrections and comments welcome
> Graham
> 
> -------------------------------------------------------------------
> Graham Samuel / The Living Fossil Co. / UK & France

=====================================================

(cont'd)

Hope this helps,
Ken N.



More information about the use-livecode mailing list