Re: NSCell and IB
Re: NSCell and IB
- Subject: Re: NSCell and IB
- From: Robert Goldsmith <email@hidden>
- Date: Mon, 17 Sep 2001 23:45:32 +0100
Hi :)
I'm not quite visualizing this, but you will need to make a single
cell that draws all of this.
This is what I gathered. Let me try to improve my description of what I want :)
think of a single column of text entries which has a scroll bar -
like a single column table.
Now think of each entry as a box instead of a line of text.
Each box contains two lines of text, a background colour and an icon.
As an example, having the icon to the left of the two lines of text,
with the two lines of text one above the other. The background could
toggle between light yellow and light blue.
You can only make a matrix/tableview out of cells. NSText and
NSImage are views. I would suggest that you subclass NSCell to draw
as you like and then use IB to design your NSTableView columns
(title, with, etc). Then programmatically set the your subclass to
be the data cell of your column.
Ok, so you are suggesting basically designing most of the window -
including the containing NSTableView and then programmatically
setting the datacell NSCell subclass on startup. I had basically
gathered this.
The remaining questions are:
how do I create NSCells like this.
Can I create NSCell layouts in IB or does it have to be done in code
Is there anything I have to worry about in particular? Like
obscure behavior?
A brief example or a url for a tutorial wouldn't go amiss either <g>
Robert
--
Please note the new email address:
email@hidden