Re: [NSTableView] How should a grid be drawn?
Re: [NSTableView] How should a grid be drawn?
- Subject: Re: [NSTableView] How should a grid be drawn?
- From: Corbin Dunn <email@hidden>
- Date: Mon, 16 Mar 2009 16:45:18 -0700
On Mar 16, 2009, at 4:06 PM, Iceberg-Dev wrote:
I'm trying to draw a custom grid for a table view.
I' using the code at the end of this post.
The problem is that when I scroll the tableview, some of the
horizontal lines are not drawn.
I looked at different sample code on the net including the GNUStep
source code and found none that was working correctly.
I displayed the clipRect to check out which parts were being
refreshed. Still some of the lines are not drawn.
I also tried doing the drawing in highlightSelectionInClipRect:
without better results.
What's wrong with the code?
Draw your grid based on the [self bounds], not [self visibleRect].
Don't use the clipRect either, just use [self visibleRect] (I think
you are using the clip rect like the visible bounds, which isn't wrong
-- it isn't the part you see, but it is the dirty part).
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