• 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
NSTableView, PopUpButtons, and controlling selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView, PopUpButtons, and controlling selection


  • Subject: NSTableView, PopUpButtons, and controlling selection
  • From: Aaron Burghardt <email@hidden>
  • Date: Wed, 18 Jun 2003 11:12:51 -0400

Hi All,

I am using an NSTableView in which one column has a PopUpButton cell. I have the popup displaying and functioning correctly. However, I don't want the selection in the table to change when the user clicks on the popup, but I haven't figured out how to achieve this behavior (the check boxes next to the song names in iTunes exhibit the behavior I'm looking for).

I experimented with

- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView

but if I return NO, then the mouse click event doesn't reach the popup. I also looked at subclassing NSPopUpButtonCell and tracking the mouse in the cell, but that's too late, the selection has already changed. I could use tracking in the cell and require a ctrl-click to activate the popup, but I shouldn't have to resort to that.

The only other possibility I can think of is to subclass NSTableView and override the mousedown event, but I suspect I will have to do a lot of work to determine whether the event happened over popup cell.

Any hints, anyone?

Thanks,
----
Aaron Burghardt
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSTableView, PopUpButtons, and controlling selection
      • From: Aaron Burghardt <email@hidden>
  • Prev by Date: RE: Using static library in Cocoa app
  • Next by Date: Re: Getting notified when my cell is hidden in NSOutlineView
  • Previous by thread: Re: Using drag-n-drop in an NSOpenPanel
  • Next by thread: Re: NSTableView, PopUpButtons, and controlling selection
  • Index(es):
    • Date
    • Thread