Re: how to set a nstabviewitem background?
Re: how to set a nstabviewitem background?
- Subject: Re: how to set a nstabviewitem background?
- From: "I. Savant" <email@hidden>
- Date: Sun, 25 Feb 2007 21:56:37 -0500
On Feb 26, 2007, at 5:30 AM, Red XIII wrote:
For some special usage, I want to set a nstabviewitem in my
nstabview to semi-transparent black background. However , after I
hovering over and over nstabviewitem APIs, I found nothing about my
purposes.
Can anyone suggest a solution? Thank you in advance.
If you want just the contents (what's inside the tabs, tabs not
included) to be a certain color, you can achieve this by setting the
tab view item's content view to a custom NSView subclass that draws
whatever background you want (via NSTabViewItem's -setView:).
You'll need to set the NSTabView to not draw a background to get
the transparency to work right (via -setDrawsBackground:). Note the
tab view type has to be NSNoTabsNoBorder for this to work.
For the entire tab view, you'll need to subclass NSTabView and
override -drawRect: which will likely be more complicated than simply
doing your thing and calling super.
That said, if you give a more specific description than "some
special usage", you might get better suggestions for your approach.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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