Re: Question on NSScrollView
Re: Question on NSScrollView
- Subject: Re: Question on NSScrollView
- From: Quincey Morris <email@hidden>
- Date: Thu, 01 May 2014 23:18:23 -0700
On May 1, 2014, at 23:03 , Varun Chandramohan <email@hidden> wrote:
> I ran ‘tableView:viewForTableColumn and it is always tableColumn == nil as I have just 1 column.
No. ‘tableColumn == nil’ means that you’re being asked for a view for a *group row*. A group row:
(a) spans all columns (though there’s just a single column to span, in this case), and
(b) has a gray background.
If you don’t want the gray background, then don’t make any group rows. Group rows are *supposed* to look different from regular rows, and they have other unique behavior, too.
(It is *possible* to customize the appearance of group rows, though I’ve never done it. But it is to your users’ advantage if the rows look the same as in other apps.)
> I noticed that I never hit anything that is not “GroupCell”. However this does not solve the grey background right?
Presumably, the top level folder that you’re displaying only has subfolders, and no files.
Note that if your intention is to display a folder *hierarchy*, you’re going to have some trouble using a NSTableView, which is intended for a flat array. NSOutlineView is better suited to a hierarchy.
_______________________________________________
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