need to not shift row in outline view

  • Hello,

    I am using an NSOutlineView and don't want the content shifted for the
    second (and last) level (I am trying to emulate iChat's group
    interface). Is there a function to call or override so that drawing
    occurs in the whole area of the cell? setIndentationPerLevel: gets the
    desired behavior for the last level, but then the top is shifted too
    much to the left. Any ideas?

    Cheers,
    Mitchell Livingston
  • > I am using an NSOutlineView and don't want the content shifted for the
    > second (and last) level (I am trying to emulate iChat's group
    > interface). Is there a function to call or override so that drawing
    > occurs in the whole area of the cell? setIndentationPerLevel: gets the
    > desired behavior for the last level, but then the top is shifted too
    > much to the left. Any ideas?

      Take a look at NSOutlineView's delegate methods ...
    -outlineView:isGroupItem: lets you designate an item as ... well ... a
    group. I'm not sure what you mean by "second (and last) level" and I
    don't use iChat, so ou may have to be more specific there.

    --
    I.S.
  • On Monday, February 04, 2008, at 10:56AM, "I. Savant" <idiotsavant2005...> wrote:
    >> I am using an NSOutlineView and don't want the content shifted for the
    >> second (and last) level (I am trying to emulate iChat's group
    >> interface). Is there a function to call or override so that drawing
    >> occurs in the whole area of the cell? setIndentationPerLevel: gets the
    >> desired behavior for the last level, but then the top is shifted too
    >> much to the left. Any ideas?
    >
    > Take a look at NSOutlineView's delegate methods ...
    > -outlineView:isGroupItem: lets you designate an item as ... well ... a
    > group. I'm not sure what you mean by "second (and last) level" and I
    > don't use iChat, so ou may have to be more specific there.
    >
    > --
    > I.S.
    >
    >

    I am already using group rows. What I mean is I have two levels, for a single folder and its contents. No nested folders, etc. What I want is to have the "content rows" take up the whole row of the table. I hope that makes more sense.
  • > I am already using group rows. What I mean is I have two levels, for a single folder and its contents. No nested folders, etc. What I want is to have the "content rows" take up the whole row of the table. I hope that makes more sense.

      A little more, but I may not be visualizing what you're talking
    about. Folders are always top-level and the only children are
    "contents" of the folders, right? Your folders are "group" rows but
    you want the children (the "content") rows to not indent? Do I have
    this right?

    --
    I.S.
  • On 4 Feb 2008, at 16:20, I. Savant wrote:

    >> I am already using group rows. What I mean is I have two levels,
    >> for a single folder and its contents. No nested folders, etc. What
    >> I want is to have the "content rows" take up the whole row of the
    >> table. I hope that makes more sense.
    >
    > A little more, but I may not be visualizing what you're talking
    > about. Folders are always top-level and the only children are
    > "contents" of the folders, right? Your folders are "group" rows but
    > you want the children (the "content") rows to not indent? Do I have
    > this right?
    >
    > --
    > I.S.
    > _______________________________________________

    I think he wants to not have the item rows indented. For this there
    are methods such as setIndentationPerLevel: and related.

    Ben.
  • Yup, sounds right. Basically, I want a way to allow outline rows to take up the whole row for select rows.

    On Monday, February 04, 2008, at 11:20AM, "I. Savant" <idiotsavant2005...> wrote:
    >> I am already using group rows. What I mean is I have two levels, for a single folder and its contents. No nested folders, etc. What I want is to have the "content rows" take up the whole row of the table. I hope that makes more sense.
    >
    > A little more, but I may not be visualizing what you're talking
    > about. Folders are always top-level and the only children are
    > "contents" of the folders, right? Your folders are "group" rows but
    > you want the children (the "content") rows to not indent? Do I have
    > this right?
    >
    > --
    > I.S.
    >
    >
  • On Feb 4, 2008 2:13 PM, Mitchell Livingston <livings124...> wrote:
    > Yup, sounds right. Basically, I want a way to allow outline rows to take up the whole row for select rows.

      You could always subclass NSOutlineView and override
    -drawRow:clipRect: (which belongs to NSTableView, of which
    NSOutlineView is a subclass).

    --
    I.S.
  • On Feb 4, 2008, at 12:53 PM, Ben wrote:

    > I think he wants to not have the item rows indented. For this there
    > are methods such as setIndentationPerLevel: and related.

      Ah - I think you're right. :-D

    --
    I.S.
  • I was able to get the behavior I wanted by returning a resized rect
    with frameOfCellAtColumn:row:

    On Feb 4, 2008, at 2:20 PM, I. Savant wrote:

    > On Feb 4, 2008 2:13 PM, Mitchell Livingston <livings124...>
    > wrote:
    >> Yup, sounds right. Basically, I want a way to allow outline rows to
    >> take up the whole row for select rows.
    >
    > You could always subclass NSOutlineView and override
    > -drawRow:clipRect: (which belongs to NSTableView, of which
    > NSOutlineView is a subclass).
    >
    > --
    > I.S.