Re: Redisplaying a NSTableColumn NSTableHeaderCell
Re: Redisplaying a NSTableColumn NSTableHeaderCell
- Subject: Re: Redisplaying a NSTableColumn NSTableHeaderCell
- From: Graham Cox <email@hidden>
- Date: Thu, 27 Jan 2011 03:22:42 +1100
Have you tried [[theTable headerView] setNeedsDisplay:YES];?
That seems like the obvious solution, but the poster in that thread claims, incorrectly, that the table header isn't a view. Yes it is.
--Graham
On 27/01/2011, at 3:05 AM, Eric Gorr wrote:
> I found this old thread:
>
> refreshing the header title for an NSTableColumn
> http://lists.apple.com/archives/cocoa-dev/2005/Nov/msg00659.html
>
> which describes the same problem I just faced.
>
> In my case, I needed to change the justification of the text in the header cell and calling setNeedsDisplay: on the table did not cause the header cell to redraw itself. My only option still appears to be telling the table to reload it's data. Of course, this could result in an unnecessary performance hit depending on how much work needs to be done when reloading the data.
>
> It is possible that -reloadDataForRowIndexes:columnIndexes: would cause the header cell to redraw if I just tell the first row and the column that changed to reload it's data, but I need to stay with the 10.5 SDK for the moment.
>
> I was only curious if there was some other better and more efficient method that I could use to get the header cell to redraw since this old thread from 2005.
>
> If there isn't, I'll file an enhancement request....it still would seem silly to need to call any reloadData method to get a header cell to redraw in this situation.
_______________________________________________
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