FROM : Evan Jones
DATE : Mon Nov 18 04:36:02 2002
A question that has appeared a few times on this mailing list, and on
other Cocoa lists, is how to get an NSTableView to display rows with
variable heights. I encountered this problem myself, and put a few
hours into creating a subclass that does exactly that. I'm also
working on subclassing NSOutlineView to add the same functionality. If
you are interested in a demo application, source code, or more details,
see the web page at:
http://www.eng.uwaterloo.ca/~ejones/software/osx-tableview.html
RowResizableTableView Features
* Completely compatible with NSTableView
As a subclass, RowResizableTableView supports the same features and
interface as NSTableView. Adding resizable rows to your program is as
easy as replacing NSTableView with RowResizableTableView.
* Rows automatically fit themselves to each cell's contents
RowResizableTableView automatically sizes its rows to fit the contents
of the cells. If the contents change, RowResizableTableView will update
the row heights.
* Editing text works as expected
When editing text in one of the cells in the table, the row will
automatically size itself to fit the wrapped text, and the text editor
will resize as expect.
* Unrestrictive open source licence (LGPL)
You get all the source code, and can use RowResizableTableView in
commercial or noncommercial projects. The only restriction is that if
you make any changes to RowResizableTableView, you must make the code
to those changes available. For more detail, read the actual LGPL
licence itself. If these terms are too restrictive, contact me and I
will be happy to negotiate an alternative with you.
I would like to know if there are any other cocoa classes (commercial
or noncommercial) out there that do something similar, and if there is
any interest in me continuing to release improvements to this class. I
would also be interested to hear from anyone who actually tries this
class, if it works or not. If you have some suggestions for future
improvements, I'd love to hear that too.
Evan Jones
--
Evan Jones: http://www.eng.uwaterloo.ca/~ejones/
"Computers are useless. They can only give answers" - Pablo Picasso
DATE : Mon Nov 18 04:36:02 2002
A question that has appeared a few times on this mailing list, and on
other Cocoa lists, is how to get an NSTableView to display rows with
variable heights. I encountered this problem myself, and put a few
hours into creating a subclass that does exactly that. I'm also
working on subclassing NSOutlineView to add the same functionality. If
you are interested in a demo application, source code, or more details,
see the web page at:
http://www.eng.uwaterloo.ca/~ejones/software/osx-tableview.html
RowResizableTableView Features
* Completely compatible with NSTableView
As a subclass, RowResizableTableView supports the same features and
interface as NSTableView. Adding resizable rows to your program is as
easy as replacing NSTableView with RowResizableTableView.
* Rows automatically fit themselves to each cell's contents
RowResizableTableView automatically sizes its rows to fit the contents
of the cells. If the contents change, RowResizableTableView will update
the row heights.
* Editing text works as expected
When editing text in one of the cells in the table, the row will
automatically size itself to fit the wrapped text, and the text editor
will resize as expect.
* Unrestrictive open source licence (LGPL)
You get all the source code, and can use RowResizableTableView in
commercial or noncommercial projects. The only restriction is that if
you make any changes to RowResizableTableView, you must make the code
to those changes available. For more detail, read the actual LGPL
licence itself. If these terms are too restrictive, contact me and I
will be happy to negotiate an alternative with you.
I would like to know if there are any other cocoa classes (commercial
or noncommercial) out there that do something similar, and if there is
any interest in me continuing to release improvements to this class. I
would also be interested to hear from anyone who actually tries this
class, if it works or not. If you have some suggestions for future
improvements, I'd love to hear that too.
Evan Jones
--
Evan Jones: http://www.eng.uwaterloo.ca/~ejones/
"Computers are useless. They can only give answers" - Pablo Picasso
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

