Re: NSMatrix made of custom buttons?
Re: NSMatrix made of custom buttons?
- Subject: Re: NSMatrix made of custom buttons?
- From: daniel <email@hidden>
- Date: Mon, 11 Oct 2004 22:43:18 -0700
I needed to do something similar to this, and I settled on a strategy
of putting a "placeholder matrix" in InterfaceBuilder, but populating
the matrix programatically.
If you take this approach, you can use setCellClass: or setPrototype:
from your windowDidLoad method, which will affect the cell used for any
future additions to the matrix. Then, remove all the cells in the
matrix and use renewRows:columns or another Matrix cell adder to get
your matrix back to the desired dimensions. Now, all of your cells
will be of the desired class.
And your twee cells will be stoked.
Daniel
On Oct 11, 2004, at 7:43 PM, Melinda 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?
Thanks very much,
Melinda
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
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