Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ClientHeight / ClientWidth for window objects?

2 posts in Objects Last posting was on 2002-08-30 11:53:58.0Z
Stefan Hubert Posted on 2002-08-30 06:43:54.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Stefan Hubert" <hubert@ai-lab.fh-furtwangen.de>
Subject: ClientHeight / ClientWidth for window objects?
Date: Fri, 30 Aug 2002 08:43:54 +0200
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: p5090ADB6.dip.t-dialin.net 80.144.173.182
Message-ID: <364_f1mLXK$TCHA.81@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:983
Article PK: 713546

Hi all,

Is there a possibility to get the height and width of this client area, as
opposed to the whole window's height/width in PB?

Here is what I want to do with this:
I want to re-adjust the size and position of the controls on my window
depending on the size of my window (on open and on resize events of the
window). In order to achieve a contol aligning on the bottom or on the
right of the window (with a certain spacing to the window's border) I use
the window object's height and width property.

Unfortunately for my matter it appears that the height and with property of
the window object comprise the title bar and the borders (wich encloses the
of the window by a couple of pixels). On the other hand, when I set the X
and Y Properties of my Controls, those values are relative to the upper left
pixels of the 'client area'(?) of the window (starting below the title bar
and (may be?) below menus and toolbars), aren't they? So here is my question
again:

Is there a possibility to get the height and width of this client area, as
opposed to the whole window's height/width in PB?


Roy Kiesler [TeamSybase] Posted on 2002-08-30 11:53:58.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: ClientHeight / ClientWidth for window objects?
Date: Fri, 30 Aug 2002 07:53:58 -0400
Lines: 41
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: host131.percussion.com 208.252.62.131
Message-ID: <364_BietV3BUCHA.276@forums.sybase.com>
References: <364_f1mLXK$TCHA.81@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:981
Article PK: 713544

Sure -- you'll need to use the ScreenToClient Win32 API together with the
UnitsToPixels PowerScript function on the way in and PixelsToUnits on the
way out.

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

"Stefan Hubert" <hubert@ai-lab.fh-furtwangen.de> wrote in message
news:f1mLXK$TCHA.81@forums.sybase.com...
> Hi all,
>
> Is there a possibility to get the height and width of this client area, as
> opposed to the whole window's height/width in PB?
>
> Here is what I want to do with this:
> I want to re-adjust the size and position of the controls on my window
> depending on the size of my window (on open and on resize events of the
> window). In order to achieve a contol aligning on the bottom or on the
> right of the window (with a certain spacing to the window's border) I use
> the window object's height and width property.
>
> Unfortunately for my matter it appears that the height and with property
of
> the window object comprise the title bar and the borders (wich encloses
the
> of the window by a couple of pixels). On the other hand, when I set the X
> and Y Properties of my Controls, those values are relative to the upper
left
> pixels of the 'client area'(?) of the window (starting below the title bar
> and (may be?) below menus and toolbars), aren't they? So here is my
question
> again:
>
> Is there a possibility to get the height and width of this client area, as
> opposed to the whole window's height/width in PB?
>
>