At 12:11 am -0700 17/08/02, Ulrich Wienands wrote: >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. > > >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.
Mmmm -- I haven't run into that difficulty before so I can't be sure of the fix. But I would first try calling "InvalRect RECT" for the newly created window rectangle which should force a redraw of the whole window's content. >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. I'll send an attachment (10k '.sit') off-list which might be similar enough to what you are doing to be relevant. >BTW, I am (still) using MacPerl 5.2.1. I wouldn't think it matters but >anyway... No, I don't think that will matter at all in this instance. Best, Alan