1. My windows don't open to the right size!!??
Could someone tell me why when I open a window using WinLib they do not
open to the full size that I say. For example if I put 500,500 for the
window size it opens to 491,443. Why is this. Is there a way to keep this
from happening. Not a real problem just an anoyance.
Dave
2. Re: My windows don't open to the right size!!??
- Posted by Brian Broker <bkb at CNW.COM>
May 16, 2000
-
Last edited May 17, 2000
On Tue, 16 May 2000 19:03:50 -0400, David Roach <roachd_76 at YAHOO.COM> wrote:
>Could someone tell me why when I open a window using WinLib they do not
>open to the full size that I say. For example if I put 500,500 for the
>window size it opens to 491,443. Why is this. Is there a way to keep this
>from happening. Not a real problem just an anoyance.
I think you are confusing the Window size and the Window's client size. If
you run the program below, you will see what I mean. The x and y passed to
onResize() are the client size of the Window. If you want the size of the
window (including title/menu/borders/etc.) then you should use 'getExtent'.
-- sample code --
include win32lib.ew
without warning
constant
Win = create( Window, "Window", 0, Default, Default, 500, 500, 0 ),
Txt1 = create( LText, "", Win, 10, 10, 150, 20, 0 ),
Txt2 = create( LText, "", Win, 10, 30, 150, 20, 0 ),
Txt3 = create( LText, "", Win, 10, 50, 150, 20, 0 )
procedure onResize_Win( integer style, integer x, integer y )
sequence extent, client
extent = getExtent( Win )
setText( Txt1, sprintf( "getExtent() Size: %d x %d",
{ extent[1], extent[2] } ) )
setText( Txt2, sprintf( "onResize() Size: %d x %d", {x,y} ) )
client = getClientRect( Win )
setText( Txt3, sprintf( "getClientRect() Size: %d x %d",
{ client[3], client[4] } ) )
end procedure
onResize[Win] = routine_id( "onResize_Win" )
WinMain( Win, Normal )
-- end sample code --
-- Brian
3. Re: My windows don't open to the right size!!??
- Posted by David Roach <roachd_76 at YAHOO.COM>
May 16, 2000
-
Last edited May 17, 2000
Thanks Brian,
You always seem to answer my questions. I just assumed that the window size
of the woking area of the window was the size that you state when you create
the window. Now I know. Thanks again.
Dave
4. Re: My windows don't open to the right size!!??
If you bind the file, then run the execute, the parameters on window size
work fine.
Running from .exw they seem to be ignored, Ive no idea why.
You can get round this by resizing the window when it opens (see one of the
examples, I think one of them does this).
Pete King.
-----Original Message-----
From: David Roach <roachd_76 at YAHOO.COM>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Wednesday, May 17, 2000 12:18 AM
Subject: My windows don't open to the right size!!??
>Could someone tell me why when I open a window using WinLib they do not
>open to the full size that I say. For example if I put 500,500 for the
>window size it opens to 491,443. Why is this. Is there a way to keep this
>from happening. Not a real problem just an anoyance.
>
>
>Dave
>