NSCells in NSCells in NSTableView?
NSCells in NSCells in NSTableView?
- Subject: NSCells in NSCells in NSTableView?
- From: Jeff LaMarche <email@hidden>
- Date: Sun, 14 Oct 2001 23:38:58 -0700
I've got a table that looks pretty crappy at the moment. The primary
reason is that one of the columns' cells require much larger rows space
than the other columns'. What I'd like to do is instead of laying the
columns all out next to each other as is typical:
!============!===============!==============!
! Col 1 ! Col 2 ! Col 3 !
!============!===============!==============!
! Row 1-1 ! Row 1-2 ! Row 1-3 !
!------------!---------------!--------------!
! Row 2-1 ! Row 2-2 ! Row 2-3 !
!------------!---------------!--------------!
...
I'd like to lay them out so that columns 2 and three are on top of each
other:
!============!==============================!
! Col 1 ! Col 2 & 3 !
!============!==============================!
! ! Row 1-2 !
! Row 1-1 !------------------------------!
! ! Row 1-3 !
!------------!------------------------------!
! ! Row 2-2 !
! Row 2-1 !------------------------------!
! ! Row 2-3 !
!------------!------------------------------!
...
(Sorry for the cheesy ascii graphics)
Now, I know I could achieve this for text cells by simply concatenating
the strings and putting a '\n' between them, but I'd like them (e.g. Row
1-2, Row 1-3) to remain as individual cells that can be clicked or
edited independently. Sort of the equivalent of embedding a table within
a cell of a table in HTML.
Can this be done using the NSTableView/NSCell architecture, or would it
require creating a new kind of Cell, Column or Table object?