Image + Text NSCell subclass

  • I'm just about to write a subclass of NSCell for an outlineview/
    tableview that displays an icon and text and supports correct text
    editing, focus rings, etc. without messing with the image.  This is
    for use in an sourcelist kind of thing.  But I'm kind of surprised
    that there isn't already one of these floating around (that I could
    find).  Any one know of one, or should I start subclassing?

    ->Ben

    --
    The user's going to pick dancing pigs over security every time. —
    Bruce Schneier
  • On mercredi, octobre 3, 2007, at 09:11  PM, Ben Lachman wrote:

    > I'm just about to write a subclass of NSCell for an
    > outlineview/tableview that displays an icon and text and supports
    > correct text editing, focus rings, etc. without messing with the
    > image.  This is for use in an sourcelist kind of thing.  But I'm kind
    > of surprised that there isn't already one of these floating around
    > (that I could find).  Any one know of one, or should I start
    > subclassing?

    DragAndDropOutlineView sample code in /Developer/Examples
  • Something like the DragNDropOutlineView example installed with the
    dev tools?

    That sample's ImageAndTextCell class should be a good start.

    - d

    On Oct 3, 2007, at 3:11 PM, Ben Lachman wrote:

    > I'm just about to write a subclass of NSCell for an outlineview/
    > tableview that displays an icon and text and supports correct text
    > editing, focus rings, etc. without messing with the image.  This is
    > for use in an sourcelist kind of thing.  But I'm kind of surprised
    > that there isn't already one of these floating around (that I could
    > find).  Any one know of one, or should I start subclassing?
    >
    > ->Ben
  • On mercredi, octobre 3, 2007, at 09:11  PM, Ben Lachman wrote:

    > I'm just about to write a subclass of NSCell for an
    > outlineview/tableview that displays an icon and text and supports
    > correct text editing, focus rings, etc. without messing with the
    > image.  This is for use in an sourcelist kind of thing.  But I'm kind
    > of surprised that there isn't already one of these floating around
    > (that I could find).  Any one know of one, or should I start
    > subclassing?

    BTW, other solutions include:

    - a NSTextFieldCell with a NSAttributedString: poor inter-spacing
    solution

    - a NSButtonCell: a solution sometimes used by Apple. IMHO It's not a
    good one because you can then click the icon.
previous month october 2007 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