Re: NSMatrix made of custom buttons?
Re: NSMatrix made of custom buttons?
- Subject: Re: NSMatrix made of custom buttons?
- From: Ricky Sharp <email@hidden>
- Date: Tue, 12 Oct 2004 06:08:17 -0500
On Monday, October 11, 2004, at 09:44PM, Melinda <email@hidden> wrote:
>
I made a subclass of NSButtonCell called tweeButton.
>
Now, I want to use Interface Builder to make a 10x10
>
matrix of tweeButtons. The only way I've found to do
>
this is to first make a matrix of NSButtonCells, and
>
then click on each of the button cells and change
>
their "custom class" to tweeButton, one by one. All
>
100 of them. Rue the day I change the size of the
>
matrix again, as they all revert back to
>
NSButtonCells. Is there a better way to do this?
I would look into making an IB palette for this. Check out the developer samples ClockControl and ClockControlPalette in /Developer/AppKit/
One of the key methods to override is allowsAltDragging (see ClockControlPalette.m). It instructs IB to allow you to option-drag a resize handle of your custom control in order to form a matrix (just as you can with some of the native controls).
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden