Re: NSButton background when pressed is turning white
Re: NSButton background when pressed is turning white
- Subject: Re: NSButton background when pressed is turning white
- From: Alastair Houghton <email@hidden>
- Date: Wed, 4 Jul 2007 12:30:59 +0100
On 4 Jul 2007, at 03:16, Garth Humphreys wrote:
Hi,
I'm new to software programming, C and Objective-C. I'm familiar
with some of the concepts, but I know I'm a long way away from
being an expert at it. None the less, I have a question about
NSButtons.
I have created a borderless NSButton, with a icon image insert into
it. But whenever I run my application and press the NSButton (with
the icon in it), a white box or background is shown. I did a search
through the lists, and found where someone asked the same question,
but no one seemed to reply. I hoping someone might be able to help
me with this.
I also read somewhere else that, I need to subclass NSButtonCell
and change the background there. But I don't know how I would do
that exactly.
Are you using a PDF image for your icon?
If so, it could be the problem I wrote about here:
<http://alastairs-place.net/2007/02/pdfs-and-nstoolbar>
If you need to change the cell for your button, the easiest way is to
do so from an -awakeFromNib method; see NSControl's +setCellClass:
method in the docs.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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