Re: wits end with nsview and nsrectfill()
Re: wits end with nsview and nsrectfill()
- Subject: Re: wits end with nsview and nsrectfill()
- From: Graham Cox <email@hidden>
- Date: Sun, 14 Dec 2014 08:42:04 +1100
> On 14 Dec 2014, at 2:20 am, Navneet Kumar <email@hidden> wrote:
>
> So if you take a view-based outline view (or maybe table view as well) and fill a table column’s view’s background with NSRectFill() or any other and add as sub view a transparent text field, upon refresh the text field and the rest of the background will differ in color as long as selection highlight is set to “Source List”. As if source list color superimposes on the area other than the text field.
>
> But I still can’t understand the nitty gritty of this.
Wait. In your original posting you wrote this:
> I have a custom view in which I am setting the background using NSRectFill() in drawRect:. I am also adding a text field as subview in this method. The textfield is non-selectable, non-editable and is not set to draw background.
So you were talking about an NSTableView or NSOutlineView all along, NOT a custom view? You can't write "custom view" and really mean table/outline view, then expect a coherent response. The two are not in any way equivalent. Expecially in Yosemite where all sorts of gratutious non-useful effects have been imposed on us to waste processor cycles and give us other pointless headaches.
If you are filling the background of a table column using NSRectFill then you should simply stop doing that. The view handles its own background drawing. You are only responsible for setting up the content of the row vews, and if one of those is a custom view (NOT the row view itself, which is assumed to be merely a transparent host for the other views within it), then you can paint the background, allowing for the new flags and features you need to deal with in Yosemite.
--Graham
_______________________________________________
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