Re: Drawing a custom NSTabView Border
Re: Drawing a custom NSTabView Border
- Subject: Re: Drawing a custom NSTabView Border
- From: Seth Willits <email@hidden>
- Date: Fri, 17 Sep 2010 16:37:35 -0700
On Sep 17, 2010, at 3:29 PM, Mr.Gecko wrote:
> Hello I'm wondering what will be the best way to draw a custom NSTabView Border. I have tried many things and it always ends up that I fail. The border gets drawn, but the objects in the Tab View, if you focus them, has a black edge around them, that is not elegant at all. Is there any examples on the internet that I could look at? This is my code below.
>
> - (void)drawRect:(NSRect)frameRect {
To me, this suggests you are thinking about this incorrectly. The rect passed to drawRect is not the view's frame, or even its bounds. It's some subrect of the view which needs to be redrawn. It could be {37, 53, 1, 1} for all you know.
If you want to draw a rect around the bounds of the view, you need to use [view bounds], not the rect passed in.
--
Seth Willits
_______________________________________________
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