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: Iceberg-Dev <email@hidden>
- Date: Tue, 17 Mar 2009 22:44:21 +0100
On Mar 17, 2009, at 12:45 AM, Corbin Dunn wrote:
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).
Works fine after applying your suggestions.
Thanks.
_______________________________________________
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