Re: Suppressing drawing
Re: Suppressing drawing
- Subject: Re: Suppressing drawing
- From: j o a r <email@hidden>
- Date: Mon, 17 Dec 2007 10:02:55 -0800
Gordon,
That should be possible if you update the frames on your views before
you update the frame on your window, or completely automatically if
your view hierarchy is capable of updating the size + position of
subviews in response to a change in the size of the window.
Have you thought abut adding code to the superview of your "panes" for
repositioning them as its size changes?
If you just stack subviews vertically, and if you're on Leopard, have
you considered using NSCollectionView?
Note that updating the frame of a view doesn't marks it as needing
display, so your call to setNeedsDisplay:NO below shouldn't be
necessary.
Btw. I take it you're using Quartz Debug to track your drawing updates?
j o a r
On Dec 17, 2007, at 9:31 AM, Gordon Apple wrote:
It wasn't quite that easy, but that did eventually solve the jump
problem. Now, if I could just get the enclosed panes to position
before
they redraw, maybe I could get rid of the redraw flash.
[window setFrame:NSMakeRect(frame.origin.x,
frameTop - newFrame.size.height,
newFrame.size.width,
newFrame.size.height)
display:NO];
// Stack the panes in their proper locations
float currentY = totalHeight; // Start at the top and work
down
for(NSView* view in array)
{
float height = [view frame].size.height;
currentY -= height;
[view setFrameOrigin:NSMakePoint(0.0, currentY)];
[view setNeedsDisplay:NO];
currentY -= ViewSpacing;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden