revisiting NSTableView 'on drag' row highlighting

  • Hi all -

    this is an old warhorse issue that has resurfaced: mandatory
    rectangular highlights "by default" in NSTableViews when dragging to
    rows.  There was once (Tiger and before) a handy private function: -
    (id)_highlightColorForCell:(NSCell *)cell; that enabled subclassers to
    disable this feature.

    I've heard that this function is no longer available in the upcoming
    release of OSX - once and for all, what is the official, future-proof
    way to handle this situation?  I'd like to handle my own table
    highlights.

    Eric

    Eric Redlinger
    co-founder, 10base-t interactive
    <eric...>
  • Hi all -

    this is an old warhorse issue that has resurfaced: mandatory
    rectangular highlights "by default" in NSTableViews when dragging to
    rows.  There was once (Tiger and before) a handy private function: -
    (id)_highlightColorForCell:(NSCell *)cell; that enabled subclassers to
    disable this feature.

    I've heard that this function is no longer available in the upcoming
    release of OSX - once and for all, what is the official, future-proof
    way to handle this situation?  I'd love to be able to handle my own
    row highlights.

    Eric

    Eric Redlinger
    co-founder, 10base-t interactive
    <eric...>
  • Howdy!

    On Oct 17, 2007, at 2:44 PM, Eric Redlinger wrote:
    >
    > Hi all -
    >
    > this is an old warhorse issue that has resurfaced: mandatory
    > rectangular highlights "by default" in NSTableViews when dragging to
    > rows.  There was once (Tiger and before) a handy private function: -
    > (id)_highlightColorForCell:(NSCell *)cell; that enabled subclassers
    > to disable this feature.

    Overriding privates is never a good idea; usually there is a different
    way to do what you want. On Tiger, you can override
    highlightSelectionInClipRect: in NSTableView, and make sure the cells
    you use don't draw backgrounds.

    >
    >
    > I've heard that this function is no longer available in the upcoming
    > release of OSX - once and for all, what is the official, future-
    > proof way to handle this situation?  I'd love to be able to handle
    > my own row highlights.

    Please ask this question again when Leopard is out, and then I can
    provide an answer.

    thanks,
    Corbin
  • > There was once (Tiger and before) a handy private function: - (id)
    > _highlightColorForCell:(NSCell *)cell; that enabled subclassers to
    > disable this feature.

    You should use the offical method instead:

    - (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView
    *)controlView

    overwritten in your Cell's subclass.

    Mani
    --
    http://www.mani.de
    iVolume - Loudness adjustment for iTunes.
    LittleSecrets - The encrypted notepad.
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