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 (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