Questions tagged [nspopupbutton]

The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface.

The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface. An NSPopUpButton object uses an NSPopUpButtonCell () object to implement its user interface.

Inherits from NSButton : NSControl : NSView : NSResponder : NSObject.

References:

179 questions
1
vote
1 answer

Can I add extra information to NSPopUpButton items in Xamarin.Mac?

I'm building a Mac OS app in C# using Xamarin.Mac. I'd like to populate a dropdown (NSPopUpButton) with items that store more information than just their title and index. Specifically I'd like to have each item also hold its own database ID, so when…
Nat Webb
  • 669
  • 1
  • 7
  • 18
1
vote
1 answer

Objective-C, NSPopMenuButton & NSMenu Color

I have an NSPopMenuButton which is connected to an NSMenu in the standard way. I tried sub-classing both in an attempt to change the background color of the menu itself. I'm clearly not doing something correctly, so any advice would be…
Joe Habadas
  • 628
  • 8
  • 21
1
vote
1 answer

NSPopUpButton - Weird behavior when populating dynamic content with Cocoa Binding

I'm trying to create a NSPopUpButton with dynamic contents, this is my design: +-------------+ | None | <-- Static | Last Item | <-- Static |-------------| <-- Separator | History: | <-- Dynamic: "History:" / "No History" | ... |…
AgentBilly
  • 756
  • 5
  • 20
1
vote
4 answers

How can you add more than 3 items to an NSPopUpButton?

In Xcode's Attribute Inspector for an NSPopUpButton there is no way to add any more than the 3 items they have assigned. Is there a way, in Xcode, to add more? How?
ScottHa
  • 31
  • 10
1
vote
1 answer

Buggy NSPopupButton in Cocoa MacOS Swift/Objective-C doesn't allow user to select first item

If we tried to create an NSPopupButton in swift/objective-c we find that if we don't set pullsdown to false, once an item other than the 1st item is selected you would never be able to select the first item back. class PopupButton: NSPopUpButton { …
Frankenstein
  • 15,732
  • 4
  • 22
  • 47
1
vote
1 answer

Adding "Not Selected" Option To Bound NSPopupButton

I have an NSPopupButton that is bound to a core data backed NSArrayController. The selection of the NSPopupButton is also bound to a core data backed item. Bindings pretty much as follows: NSArray 'A' of core data entities --> Array…
Hooligancat
  • 3,588
  • 1
  • 37
  • 55
1
vote
2 answers

NSTableView content based on a selection of another NSArrayController

The issue I have a popup button (NSPopUpButton) that is bound to an NSArrayController. This array controller handles parent objects that each have a collection of child objects. I have an NSTableView in which I need to show these children for the…
mkko
  • 4,262
  • 3
  • 25
  • 29
1
vote
1 answer

NSPopUpButton: NSPopUpButtonCell deprecated?

The documentation for NSPopUpButton states: An NSPopUpButton object uses an NSPopUpButtonCell object to implement its user interface. I derived a new class from NSPopUpButtonCell which implements drawBorderAndBackgroundWithFrame:inView: to…
phimuemue
  • 34,669
  • 9
  • 84
  • 115
1
vote
2 answers

Using a Popup button in Master-Detail

My Document based, Core Data application (using bindings in IB) has two entities, Employee (with an employeeName attribute) and TimeSheet (with timeDescription and entryDate attributes). Employee has a…
1
vote
1 answer

Swift: How to change NSPopupButton edit menu item text

I have a NSPopupButton on my GUI and im looking for a way to programmatically change the text of a specific item: 'item 1' 'item 2' ---> 'item b' 'item 3'
user9081219
1
vote
1 answer

nspopupbutton not behaving properly - showing Reversely

I am facing unique issue with nspopupbutton in one of my mac application. I am using table view to load the filters, filters having different options, We can select the option from dropdown. As like I shown below. My Issue is , After adding another…
1
vote
1 answer

NSPopupButton that displays image not text of selected item

I am creating a NSPopUpButton that has multiple NSMenuItems each with an image and a title. The functionality I am trying to create is as such: When the popup is displaying I would like it to behave normally, displaying the title and image, however…
1
vote
1 answer

Prevent title change of NSPopUpButton at selection

I have a NSPopUpButton without title. I set a NSImage for this popup button. When I bind the Content value to an array with strings (to create a demo) the title of the popup button changes to the value of the array. Is there a way to keep the image…
Mike Nathas
  • 1,247
  • 2
  • 11
  • 29
1
vote
0 answers

NSTableView button in wrong cell after reloadData

I have a window with an NSTableView that is populated from an NSMutableArray. In one column I programmatically create an NSPopUpbutton and add the items and set the title according to a value in the data source array. When the window is first…
julian
  • 157
  • 1
  • 12
1
vote
0 answers

NSPopUpButton set selected item trouble

I have an NSTableView and in one cell I have an NSPopUpButton... ok. I want to set the selected item in the pop up button based on a value but no matter what I do I can't seem to set which menu item gets selected... What I need is if p.status is…
julian
  • 157
  • 1
  • 12