On Wed, Jul 1, 2009 at 8:09 PM, Peter
Zegelin<pe...@fracturedsoftware.com> wrote:
>
> On 01/07/2009, at 6:55 PM, Dado Colussi wrote:
>
>> Subclass NSTableView and implement your special drawing in -
>> (void)drawBackgroundInClipRect:(NSRect)clipRect.
>>
>> /Dado
>
> Problem with this is there is no obvious concordance ( that I can see)
> between a row and its rectangle.
Doesn't need to be obvious, because Apple figured it out for you
already. To go from a location to a row:

- (NSInteger)rowAtPoint:(NSPoint)point;

And to go from a row to a rectangle:

- (NSRect)rectOfRow:(NSInteger)row;

> Wouldn't scrolling affect all this?

No. Scrolling is accomplished by applying a transform to the table's
superview. Coordinates within the scrolled view itself are not
affected at all.

Mike
_______________________________________________

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