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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to