Re: Variable Size Matrix
Re: Variable Size Matrix
- Subject: Re: Variable Size Matrix
- From: Drew McCormack <email@hidden>
- Date: Fri, 23 Nov 2001 09:00:20 +0100
I tried this a month or two ago, but in the end gave up. But I did get a
long way. I had a table view that could have inconsistent row heights
working, but I couldn't get the field editor to resize as text was
added. I don't know what you want to use the table for, but if editing
text is not necessary, I think my approach would be adequate.
Basically, I subclassed NSTableView, and overrode the layout methods
(eg rectOfRow:, rectOfColumn:, etc). This works, it seems.
If you want my code, just let me know. It is far from polished (read
optimized), but it would at least let you see which methods to override.
I think it would only be a few hundred lines of code, at most.
Drew McCormack
On Thursday, November 22, 2001, at 10:31 , Donald Brown wrote:
I need a Matrix or table where both the column widths and row heights
may be
inconsistent (some rows will have a greater height than others).
Obviously,
neither NSMatrix nor NSTableView will work, neither of them can deal
with
variable row heights. Is there some other tool I'm missing, or do I
have to
roll my own? If the later, would it be easier to subclass NSMatrix,
NSTableView, or work from scratch?
Donald
--
Donald Brown
email@hidden
http://www.eamontales.com
We have met the enemy and he is us - Pogo
_______________________________________________
MacOSX-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/macosx-dev
================================
Dr. Drew McCormack
Department of Theoretical Chemistry
Science Faculty
Free University Amsterdam
De Boelelaan 1083
1081 HV Amsterdam
The Netherlands
Email :: email@hidden
Tel. :: +31 20 44 47623
Fax :: +31 20 44 47629