Re: NSTableRowView appearance when group rows float - SOLVED
Re: NSTableRowView appearance when group rows float - SOLVED
- Subject: Re: NSTableRowView appearance when group rows float - SOLVED
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 16 Aug 2014 13:50:26 -0400
On Aug 10, 2014, at 4:54 PM, Bill Cheeseman <email@hidden> wrote:
> My application has a source list using a view-based NSOutlineView. My code does nothing to dictate the initial or subsequent appearance of the group rows other than to implement the -outlineView:isGroupRow: delegate method to identify which rows are group rows, to turn on the outline view's "Floats Group Row" setting in the nib file, and to set the group rows' text field's string values to all caps programmatically....
>
> When I launch my application, all of the group rows have the standard group row appearance, including a boldface font (I assume that's standard, based on lots of email posts over the years, although I don't see it documented anywhere) -- except for the first group row at the top of the window, which is in a regular (non-bold) typeface. As soon as I scroll the table view up a tiny bit so that, presumably, the top group row begins to float, it changes to boldface, too. When I scroll farther up to bring lower group rows to the top so that they, too, one by one, presumably begin to float, they stay boldface just as they were at launch. When I scroll back down so that, presumably, one by one, each of the group rows stops floating, they all stay boldface, including the top group row that started out in a regular typeface.
I have now solved the problem of the first group row appearing in regular (non-bold) typeface at launch and only changing to boldface when the source list is first manually scrolled. The culprit was a call to -[NSTableView sizeLastColumnToFit] in my application's -awakeFromNib, which I had included only because one of Apple's sample projects called it. I never thought it was needed, and once I removed it the first group row now appears in boldface at launch like all the other group rows.
My source list using floating group rows now works reliably and without any problems -- at least none that I have found after hours of testing.
--
Bill Cheeseman - email@hidden
_______________________________________________
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