• 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: Live resizing NSTableView causes ghosting/nastiness in custom drawn NSTextFieldCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Live resizing NSTableView causes ghosting/nastiness in custom drawn NSTextFieldCell


  • Subject: Re: Live resizing NSTableView causes ghosting/nastiness in custom drawn NSTextFieldCell
  • From: Corbin Dunn <email@hidden>
  • Date: Mon, 02 Mar 2009 08:02:48 -0800


On Feb 27, 2009, at 4:02 PM, Andrew Yeaton wrote:

I have a custom subclass of an NSTextFieldCell that draws a right- aligned "badge" (like Mail.app's unread count). The column that uses the custom cell autoresizes with the width of the NSTableView (which resizes with the window).

The problem:

When the width of the column expands quickly, the cell width doesn't resize smoothly and seems to have ghosting.

My drawing code seems to be working, but appears to be drawing "under" a cached version from the original width. It's as if, my draw is happening correctly, but a cached image is being placed over top anyway.

Is there a way to make the column resize smoothly and draw correctly?

Ideally, overriding -preservesContentDuringLiveResize and returning NO should work, but unfortunately does not (this is a known problem). Instead, subclass NSTableView, override -drawRect:, and call [super drawRect:]. The "custom" drawing will turn off live-resize caching.


corbin


_______________________________________________

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


  • Prev by Date: Re: Animate the way a HUD panel appears.
  • Next by Date: Can't use in/contains operator with collection FIRST
  • Previous by thread: Re: The fieldEditor and a focus ring
  • Next by thread: Can't use in/contains operator with collection FIRST
  • Index(es):
    • Date
    • Thread