alternative to NSMatrix due to cell size restriction

  • Hi All,

    I have an NSView in which I'm placing an NSMatrix, with the number of
    columns modifiable by the user.

    The problem is that I need to have cells of differences sizes in the
    NSMatrix so perhaps NSMatrix is not suitable for me.

    The user will be able to drag stuff (text, images etc) into each cell,
    resulting in differing cell dimensions.

    So if NSMatrix isn't suitable because every cell is of the same size,
    what else can I use?

    Thanks!

    Eric
  • You may want to use an NSTableView instead, sort of along the lines of what
    iTunes uses in its many different kinds of table-based modes. (Especially
    that new one with the artwork.)

    -Steven

    On Wed, Feb 17, 2010 at 6:17 AM, Eric Boo <ericboo...> wrote:

    > Hi All,
    >
    > I have an NSView in which I'm placing an NSMatrix, with the number of
    > columns modifiable by the user.
    >
    > The problem is that I need to have cells of differences sizes in the
    > NSMatrix so perhaps NSMatrix is not suitable for me.
    >
    > The user will be able to drag stuff (text, images etc) into each cell,
    > resulting in differing cell dimensions.
    >
    > So if NSMatrix isn't suitable because every cell is of the same size,
    > what else can I use?
    >
    > Thanks!
    >
    > Eric
    >

    --
    Steven Degutis
    http://www.thoughtfultree.com/
    http://www.degutis.org/
  • Thanks, for reference, if someone is doing it this way, this link can help:
    http://www.noodlesoft.com/blog/2009/10/20/yet-another-way-to-mimic-the-artw
    ork-column-in-cocoa/


    However, it also means that even the rows of the columns will align.
    Each artwork cell's bottom will align with the bottom of other
    columns' cells in the corresponding rows.

    In order to not have any cell alignment at all across columsn, I'm
    thinking of an NSTableView with say, 3 columns (user modifiable), and
    only 1 row.
    In each cell in that row, there will be an NSTableView with 1 column
    and many rows.

    I wonder if this is possible? I can't find any information about
    embedding tables in cells.

    On Wed, Feb 17, 2010 at 11:07 PM, Steven Degutis
    <steven.degutis...> wrote:
    > You may want to use an NSTableView instead, sort of along the lines of what
    > iTunes uses in its many different kinds of table-based modes. (Especially
    > that new one with the artwork.)
    > -Steven
    >
    > On Wed, Feb 17, 2010 at 6:17 AM, Eric Boo <ericboo...> wrote:
    >>
    >> Hi All,
    >>
    >> I have an NSView in which I'm placing an NSMatrix, with the number of
    >> columns modifiable by the user.
    >>
    >> The problem is that I need to have cells of differences sizes in the
    >> NSMatrix so perhaps NSMatrix is not suitable for me.
    >>
    >> The user will be able to drag stuff (text, images etc) into each cell,
    >> resulting in differing cell dimensions.
    >>
    >> So if NSMatrix isn't suitable because every cell is of the same size,
    >> what else can I use?
    >>
    >> Thanks!
    >>
    >> Eric
    >
    >
    >
    > --
    > Steven Degutis
    > http://www.thoughtfultree.com/
    > http://www.degutis.org/
    >
  • On Wed, 17 Feb 2010 19:17:51 +0800, Eric Boo <ericboo...> said:
    > Hi All,
    >
    > I have an NSView in which I'm placing an NSMatrix, with the number of
    > columns modifiable by the user.
    >
    > The problem is that I need to have cells of differences sizes in the
    > NSMatrix so perhaps NSMatrix is not suitable for me.
    >
    > The user will be able to drag stuff (text, images etc) into each cell,
    > resulting in differing cell dimensions.
    >
    > So if NSMatrix isn't suitable because every cell is of the same size,
    > what else can I use?

    What about just a view of subviews and manage the layout of the subviews
    yourself?

    m.

    --
    matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
    A fool + a tool + an autorelease pool = cool!
    AppleScript: the Definitive Guide - Second Edition!
    http://www.tidbits.com/matt/default.html#applescriptthings
previous month february 2010 next month
MTWTFSS
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
Go to today