• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [NSTableView] How should a grid be drawn?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [NSTableView] How should a grid be drawn?
      • From: Iceberg-Dev <email@hidden>
References: 
 >[NSTableView] How should a grid be drawn? (From: Iceberg-Dev <email@hidden>)

  • Prev by Date: [NSTableView] How should a grid be drawn?
  • Next by Date: Re: [iPhone] NumberPad with the dot
  • Previous by thread: [NSTableView] How should a grid be drawn?
  • Next by thread: Re: [NSTableView] How should a grid be drawn?
  • Index(es):
    • Date
    • Thread