Re: Custom Buttons - Tutorial/Examples...
Re: Custom Buttons - Tutorial/Examples...
- Subject: Re: Custom Buttons - Tutorial/Examples...
- From: Ben Lachman <email@hidden>
- Date: Sat, 5 Apr 2008 23:34:37 -0400
This isn't a subject that I've ever seen addressed really thoroughly
in a tutorial type walk though, its more a journey of gleaning all
the info you need to create new buttons and controls. Personally I'd
call custom control creation the dark art of Cocoa ;-).
For your case though I think looking at setShowsStatesBY: and
setHighlightsBy: should suffice to solve your problem. Also make
sure you look at all the constants that are valid, not just the ones
the developer docs talk about (NSNoCellMask and siblings).
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
email@hidden
740.590.0009
On Apr 5, 2008, at 6:08 PM, John Joyce wrote:
Does anybody know a tutorial or example on creating custom buttons
in Cocoa?
I can certainly set an image in IB or programmatically, but how can
I determine the actual hitmask? Or even set the mouseOver type of
event for something like a rollover ?
I know I'm talking about stepping on Apple's HIG, but it is
something I'd like to know how to do without delving into CG or CA
right now.
I've been toying with it a bit today, and I can certainly set the
images, but on mouse down, the background changes to the image with
a darkened state inside of a white rectangle... surely I'm missing
something stupidly obvious...?
Any tips or links are greatly appreciated!
Cheers,
JJ
_______________________________________________
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
_______________________________________________
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