• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Suppressing drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Suppressing drawing (From: Gordon Apple <email@hidden>)

  • Prev by Date: Re: How do I get NSRect to be the same as CGRect?
  • Next by Date: How to implement an "Accordion" view?
  • Previous by thread: Re: Suppressing drawing
  • Next by thread: Temporarily disabling bindings for performance?
  • Index(es):
    • Date
    • Thread