group row custom drawing nstableview

  • Hi,

    I'm having some trouble doing a custom drawing for my group row in a view-based nstableview.  First of all I subclassed NSTableRowView is this correct?  And if so the problem I'm having is to recreate the floating effect which normally happens automatically if using a standard NSTableCellView.  I'm able to get the isFloating property, but I'm not sure what's the correct way to make the row float (setAlpha?) without making the text "float" as well?  Any pointers to get me going in the right direction here would be much appreciated.  Thanks!

    rc
  • Hi Rick,
    On May 22, 2012, at 9:14 PM, Rick C. <rickcorteza...> wrote:

    > Hi,
    >
    > I'm having some trouble doing a custom drawing for my group row in a view-based nstableview.  First of all I subclassed NSTableRowView is this correct?

    Yes, that is correct.

    > And if so the problem I'm having is to recreate the floating effect which normally happens automatically if using a standard NSTableCellView.  I'm able to get the isFloating property, but I'm not sure what's the correct way to make the row float (setAlpha?) without making the text "float" as well?  Any pointers to get me going in the right direction here would be much appreciated.  Thanks!

    I'm not sure what you mean...you simply can draw (override the drawBackground method) with an non-1.0 alpha color and the row will appear translucent (only when floating).

    corbin

    >
    > rc
  • Thanks Corbin for the reply.  Ok I will continue with NSTableRowView and see if I can get the floating right this time.  I'll let you know thanks again!

    rc

    On May 24, 2012, at 12:10 AM, Corbin Dunn wrote:

    > Hi Rick,
    > On May 22, 2012, at 9:14 PM, Rick C. <rickcorteza...> wrote:
    >
    >> Hi,
    >>
    >> I'm having some trouble doing a custom drawing for my group row in a view-based nstableview.  First of all I subclassed NSTableRowView is this correct?
    >
    > Yes, that is correct.
    >
    >> And if so the problem I'm having is to recreate the floating effect which normally happens automatically if using a standard NSTableCellView.  I'm able to get the isFloating property, but I'm not sure what's the correct way to make the row float (setAlpha?) without making the text "float" as well?  Any pointers to get me going in the right direction here would be much appreciated.  Thanks!
    >
    > I'm not sure what you mean...you simply can draw (override the drawBackground method) with an non-1.0 alpha color and the row will appear translucent (only when floating).
    >
    > corbin
    >
    >>
    >> rc
    >
  • Was able to get it working thanks again!

    rc

    On May 24, 2012, at 12:10 AM, Corbin Dunn wrote:

    > Hi Rick,
    > On May 22, 2012, at 9:14 PM, Rick C. <rickcorteza...> wrote:
    >
    >> Hi,
    >>
    >> I'm having some trouble doing a custom drawing for my group row in a view-based nstableview.  First of all I subclassed NSTableRowView is this correct?
    >
    > Yes, that is correct.
    >
    >> And if so the problem I'm having is to recreate the floating effect which normally happens automatically if using a standard NSTableCellView.  I'm able to get the isFloating property, but I'm not sure what's the correct way to make the row float (setAlpha?) without making the text "float" as well?  Any pointers to get me going in the right direction here would be much appreciated.  Thanks!
    >
    > I'm not sure what you mean...you simply can draw (override the drawBackground method) with an non-1.0 alpha color and the row will appear translucent (only when floating).
    >
    > corbin
    >
    >>
    >> rc
    >
previous month may 2012 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 29 30 31      
Go to today