• 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: 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


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

  • Prev by Date: UIView hidden - still drawing the subviews? [SOLVED]
  • Next by Date: Re: UIView hidden - still drawing the subviews?
  • Previous by thread: Re: [NSTableView] How should a grid be drawn?
  • Next by thread: Enforcing trial software on Mac
  • Index(es):
    • Date
    • Thread