Re: Columns with diminishing number of rows?
Re: Columns with diminishing number of rows?
- Subject: Re: Columns with diminishing number of rows?
- From: Henry McGilton <email@hidden>
- Date: Fri, 11 Apr 2003 04:43:44 -0700
On Friday, April 11, 2003, at 03:12 AM, Jyrki Wahlstedt wrote:
Hi,
I would like to get advice on this: I'd like to build a table, in
which the number of rows in each column is different, specifically so
that the first column has 2^n rows (n is not great, at most six), the
next column 2^(n-1) etc. and the last column just one row (this limits
the maximum number of columns also). I had a quick look at the
documentation and it seems there is no easy way to do this, at least
NSTableView doesn't seem to have a way to set row height columnwise.
The number of rows of data displayed in a specific column depends
entirely on your data model. So in this case your data model
would look like a triangular array, but with each column of the
array containing half of the elements of the previous one.
So in your stated example, you would have seven columns.
At configuration time, you add columns to your table view.
Then you tell the table view to reload its data.
Take a look at the NSTableDataSource protocol, which
describes the methods you can implement to provide data
to the table view.
As for setting row height and such, you need to look at the
documentation for NSTableColumn where you can find information
on changing the attributes of the cells.
Could this be done with NSBrowser setting a different matrix for each
column (each matrix would of course have different characteristics,
especially row height)? Does this make any sense at all? If someone
has worked through something alike, I would be grateful of help or
even some sample code showing the way!
Best Wishes,
........ Henry
===============================+============================
Henry McGilton | Trilithon Software
Boulevardier, Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
===============================+============================
_______________________________________________
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.