• 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
NSPopUpButton overriding auto-selection?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopUpButton overriding auto-selection?


  • Subject: NSPopUpButton overriding auto-selection?
  • From: Calum Robinson <email@hidden>
  • Date: Wed, 20 Mar 2002 17:19:49 +0000

I have an NSPopUpButton that lets the user select a 'preset' from list, with an 'Edit Presets...' item at the bottom of the list, similar to the same control for Locations in the Network preferences pane.

The problem that I (and apparently the preferences pane too) have is that selecting a command like 'Edit..' automatically sets the title of the popup button to this command. Instead, I would like the title to remain as the title of the selected preset. You can set the title of the popup button after selecting the 'Edit...' command, but there is an ugly switch to and from the intermediate title.

I have tried subclassing NSPopUpButton, intercepting setTitle: , selectItem: and synchronizeTitleAndSelectedItem: etc., but to no avail.

Is this a case of 'Apple can't do it, so why should I' or does anyone know of a workaround?


Calum Robinson
http://homepage.mac.com/calumr
_______________________________________________
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: Setting VM Memory Allocation for Cocoa Java app
  • Next by Date: Re: Cocoa's Popularity
  • Previous by thread: Re: Setting VM Memory Allocation for Cocoa Java app
  • Next by thread: NSScrollView with text fields
  • Index(es):
    • Date
    • Thread