Re: multiple views with segmented control
Re: multiple views with segmented control
- Subject: Re: multiple views with segmented control
- From: Jeremy Dronfield <email@hidden>
- Date: Wed, 17 Mar 2004 10:48:20 +0000
On 17 Mar 2004, at 6:52 am, cauri wrote:
On the interface of my cocoa app I would like to have an interface
much like that of ical where you have a segmented button on the bottom
that changes the main view from day to month to year. How do I create
that?
NSSegmentedControl is a new class, not yet available in Interface
Builder. You can create one and add it to your window programmatically.
It's reasonably well documented.
However, iCal's segmented control is a custom-built job made up of
borderless NSButtons. It can be replicated in IB if you fish all the
images out of iCal's package. The advantages of using a custom replica
like this are that you a) have more control over the size of the
buttons, and b) can specify an alternate image for its pressed state.
NSSegmentedControl just greys over when pressed, whereas iCal's control
goes a nice deep shade of blue. The advantage of using
NSSegmentedControl, however, is that it's a whole lot easier.
-Jeremy
===================================
SkoobySoft, home of viJournal
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.