Re: NSMatrix Questions
Re: NSMatrix Questions
- Subject: Re: NSMatrix Questions
- From: Olivier <email@hidden>
- Date: Sat, 10 Aug 2002 11:57:18 -0500
You need to access the prototype cell and set the attribute of your cell
here. The prototype cell is the model that NSMatrix replicate when you
create a new cell. So if you do anything to it, all your cell will
reflect the change. use the instance method - (id)prototype on the
matrix to get the prototype cell and change the border style on that
one, set all parameter you need for the cell there. The prototype method
will return a NSTextFieldCell.
On Saturday, August 10, 2002, at 01:00 AM, terry wrote:
>
Hi again,
>
>
I'm still struggling with my NSMatrix creation.
>
>
I've managed to get one created:
>
>
startMatrix = [[NSMatrix alloc] initWithFrame: aFrame mode:
>
NSTrackModeMatrix cellClass: [NSTextFieldCell class] numberOfRows: 4
>
numberOfColumns: 1];
>
>
And displayed:
>
>
[protocolWindow setContentView:startMatrix];
>
>
What I get is 4 controls stacked upon each other that appear to only be
>
text. They all say "Field", but have no "input box" to type into, and
>
no border of any kind... I assume that I need to set this all up
>
programmatically, but I can't figure out how to set the selected cell
>
so I can get access to the specific controls therein.
>
>
there isn't a setSelectedTag method for NSMatrix objects, and it
>
doesn't seem like setTag will do what I want (It's unclear to me
>
whether it sets the tag of the matrix, or the selected tag, but appears
>
that it's for the Matrix, which isn't what I want)
>
>
Is there an easier way to do this? I've been attempting to poke back
>
through the super classes, but so far no luck.
>
>
I don't want to do this programmatically, but I can't think of another
>
way... I want to do something similar to what iTunes 3's Smart Playlist
>
"Advanced" filtering allows you to do, where you can click the "+"
>
button, to get another set of fields, and buttons to narrow the search
>
down even farther.
>
>
I can't think of a way to do this with IB, but I'll admit that I'm so
>
new to it that I really have no idea...
>
>
It seems doable programmatically though... I was thinking of doing an
>
NSArray of NSMatrix objects, where each NSMatrix object holds a set of
>
controls. Each time the user wanted to "add" a set of controls,
>
another NSMatrix object would be created and stored in the NSArray
>
object.
>
>
So those are my thoughts on it...
>
>
Thanks for your help,
>
>
- Terry
>
_______________________________________________
>
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.
_______________________________________________
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.