Re: Recalculating NSTableView row sizes during a live column resize
Re: Recalculating NSTableView row sizes during a live column resize
- Subject: Re: Recalculating NSTableView row sizes during a live column resize
- From: Keith Blount <email@hidden>
- Date: Thu, 25 Jun 2009 13:25:41 -0700 (PDT)
Thanks for your reply. I'm not so sure, though - I've tried overriding -inLiveResize to return NO no matter what, I've tried overriding -drawRect: and passing [self visibleRect] to super's -drawRect, and I've tried calling -display, -setNeedsDisplay: and -displayIfNeeded in various places, immediately upon resize, to try to force an entire redraw, but nothing has any effect - except, as I say, on the columns that are actually being resized. I wish I could find that thread which seemed to indicate some private view was used in the drawing during live resize, but I can't find it anywhere... Perhaps I did imagine it.
Thanks again,
All the best,
Keith
--- On Thu, 6/25/09, Kyle Sluder <email@hidden> wrote:
> From: Kyle Sluder <email@hidden>
> Subject: Re: Recalculating NSTableView row sizes during a live column resize
> To: "Keith Blount" <email@hidden>
> Cc: email@hidden
> Date: Thursday, June 25, 2009, 8:10 PM
> On Thu, Jun 25, 2009 at 11:10 AM,
> Keith Blount<email@hidden>
> wrote:
> > ...Except. Only the columns that are getting resized
> (the column the user is dragging and the last auto-sized
> column in this case) get drawn correctly with the new
> heights. All of the columns in-between - the columns whose
> widths *aren't* changing - refuse to redraw no matter what I
> try (I've tried forcing display and reloading the data from
> numerous places), and instead draw using the old row heights
> until column resizing ends and they snap to where they
> should be. My wild guess (well, not exactly - I'm sure I saw
> something on Google about this earlier but now cannot find
> it) is that during live column resizing, either the table
> header view or the table view itself cache an image of the
> columns that aren't being resized as they are at the
> beginning of the drag, and show that cached image rather
> than drawing the columns live using their NSCells. At least,
> that's the only reason I can think of for these columns not
> changing their row heights when the ones
> > being resized around them do.
>
> I don't think they're caching any image. Rather, the
> table view is
> probably using some sort of live resize flag to optimize
> redraw.
> Don't forget that update coalescing causes redraw not to be
> performed
> immediately.
>
> --Kyle Sluder
>
_______________________________________________
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