• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing a custom NSTabView Border
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Drawing a custom NSTabView Border (From: Mr.Gecko <email@hidden>)

  • Prev by Date: Is it possible to have a plist date to be null?
  • Next by Date: Re: Is it possible to have a plist date to be null?
  • Previous by thread: Drawing a custom NSTabView Border
  • Next by thread: Re: Drawing a custom NSTabView Border
  • Index(es):
    • Date
    • Thread