• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cells selection in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cells selection in NSTableView


  • Subject: Re: Cells selection in NSTableView
  • From: Dado Colussi <email@hidden>
  • Date: Fri, 17 Jul 2009 09:54:02 +0200

>
>         I need following functionality to be implemented in NSTableView.
>                        "Selecting Multiple cells of single column in
> NSTableView".
>
>        I subclassed NSTableView and created class TestTableView.
>
>        I have done following 3 things.
>
> ...

> 3) I created custom class for NSTextFieldCell and overriden following
> method
>
> - (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView
> *)controlView
> {
>        return nil;
> }



Do not override -highlightColorWithFrame:inView:. Instead, override
-setHighlighted: and -setBackgroundStyle: with empty
implementations. Then override -drawWithFrame:inView:, and determine whether
the cell (center point) is inside any selected cell rectangle. If yes, then
-[super setHighlighted:YES], otherwise -[super setHighlighted:NO].

/Dado
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Cells selection in NSTableView (From: Dinakar Pulakhandam <email@hidden>)

  • Prev by Date: Re: [iPhone] Custom -sizeWithFont: and CGContextRef question
  • Next by Date: Re: Codesign from Buid Server
  • Previous by thread: Cells selection in NSTableView
  • Next by thread: Process crash while using NSURLConnection
  • Index(es):
    • Date
    • Thread