tags:

views:

154

answers:

1

I would like to create a custom check box that functions just like a normal check box but looks different, at the moment I am using normal check box's, is there a way to do this.

P.S This is Cocoa i am talking about.

+5  A: 

You need to override NSButtonCell. You'll use drawInteriorWithFrame:inView: or a simililar method to do your custom drawing. If you've never used custom cells before it can be a bit of a learning experience, but there's a lot of good advice out there, like this page to start with.

You could also take a look at an open source framework like BGHUDAppKit for an example.

Marc Charbonneau
How do you implement the BGHUDAppKit?
Joshua
It's just a standard framework, you can find instructions in the wiki: http://code.google.com/p/bghudappkit/wiki/UsingFramework
Marc Charbonneau
How do you download BGHUDAppKit?
Joshua
Open the Terminal and type this "svn checkout http://bghudappkit.googlecode.com/svn/trunk/ bghudappkit-read-only"That will download the BGHUDAppKit XCode project and place it in your home directory. You can move it from there to wherever and open in XCode.
willc2
It says that bghudappkit.googlecode.com/svn/trunk is not a valid url.
Joshua
Fixed that, needed to add http://, but where is the IB plugin?
Joshua