Re: Win32lib System Metrics
- Posted by bobspringett <bobspringett at WANADOO.FR> Aug 18, 2000
- 443 views
Many thanks Brian. I had located getClientRect() but could nowhere find the corresponding 'set' function. I know why now. Regards Bob ----- Original Message ----- From: Brian Broker <bkb at CNW.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Friday, August 18, 2000 1:27 AM Subject: Re: Win32lib System Metrics > On Thu, 17 Aug 2000 19:20:12 -0400, Brian Broker wrote: > > >-- setClientRect Demo > >-- by Brian Broker > >-- click in window to use 'setClientRect' > > Sorry, I didn't finish 'optimizing' setClientRect(). You can even shorten > it up a bit: > > ------------------------------ > procedure setClientRect( integer id, integer width, integer height ) > sequence client, diff > > -- get current client size > client = getClientRect( id ) > -- get current window size and subtract client size > diff = getExtent( id ) - client[3..4] > -- add difference to specified window size > setSize( id, width+diff[1], height+diff[2] ) > end procedure > ------------------------------