On Sat, 10 Aug 2002, Alan Fry wrote:

> At 2:14 pm -0700 09/08/02, Ulrich Wienands wrote:
> >I'd like - in the "redraw" event handler - to get access to the elements
> >of the bounding rectangle of the active window.
>
> It can be found from 'portRect' which is one of fields in the
> window's 'GrafPtr', so you can call "$win->window->portRect". From
> this you can get the 'top, bottom, left and right' values of the
> window's rectangle (in local co-ordinates).
> <snip>
> That's sounds the way to go. I have some scripts which involve
> rescaling and repositioning scroll-bars and text blocks as the window
> is resized. I can let you have these if it would be helpful.
>
> HTH,
>
> Alan Fry
>
Alan, thanks. I am getting the coordinates fine now. However, the redraws
are partial only and in my little test routine only the redrawn
part uses the new information. For testing I am just DrawString-ing the
updated coord's and it literally cuts the text and characters into pieces,
leaving the old numbers in the area not in need of update and putting the
new numbers or parts thereof into the updated part.

If you can send me your routines I can probably figure out what else I
have to do.

BTW, I am (still) using MacPerl 5.2.1. I wouldn't think it matters but
anyway...

Tx,

Uli Wienands

Reply via email to