• 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: NSTableView like iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView like iTunes


  • Subject: Re: NSTableView like iTunes
  • From: Nicko van Someren <email@hidden>
  • Date: Mon, 2 Aug 2004 14:38:53 +0100
  • Resent-date: Mon, 2 Aug 2004 15:49:00 +0100
  • Resent-from: Nicko van Someren <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: cocoa-dev Dev <email@hidden>

On 30 Jul 2004, at 16:45, Luca Torella wrote:

I'd like to know how to create a table view like iTunes one. I mean, in iTunes, if you control click with your mouse on the top-right corner a menu shows up. A menu in which the user can choose what columns to display and what columns hide.

You can set a view to go in the top right of an NSTableView using the -setCornerView: message. You could use an NSImageView to display a little menu icon an simply attach a fixed menu using -setMenu: inherited from NSResponder or you could subclass NSView to draw something else and override -menuForEvent: inherited from NSView.

As I understand it there is currently no way to have the menu contents built for you using bindings directly, although one thing you can do is build an NSPopUpButton using bindings in IB, set it as hidden so that no one ever sees it and then implement -menuForEvent: to simply return [yourPopUpButton menu]

Nicko
_______________________________________________
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.


  • Prev by Date: Re: [OT] Premature optimizations
  • Next by Date: Re: hanging on NSUserDefaults setValue:forKey
  • Previous by thread: Re: NSTableView like iTunes
  • Next by thread: Re: Why the rules concerning release?
  • Index(es):
    • Date
    • Thread