NSPopUpButton overriding auto-selection?
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.