Questions tagged [nspopupbuttoncell]

The NSPopUpButtonCell class defines the visual appearance of pop-up buttons that display pop-up or pull-down menus.

The NSPopUpButtonCell class defines the visual appearance of pop-up buttons that display pop-up or pull-down menus. Pop-up menus present the user with a set of choices, much the way radio buttons do, but using much less space. Pull-down menus also provide a set of choices but present the information in a slightly different way, usually to provide a set of commands from which the user can choose.

The NSPopUpButtonCell class implements the user interface for the NSPopUpButton class.

Note that while a menu is tracking, adding, removing, or changing items on the menu is not reflected.

MORE: NSPopUpButtonCell Class Reference

45 questions
1
vote
0 answers

How to programmatically set an NSPopUp title. Swift4 OSX

I have an IB NSPopUpButton with a list of items and a number of NSTextFields. The items from the popup are used to populate the text fields (ingredients) until a recipe is complete. I would like to reset the popup title after each item is used but…
Terence K
  • 41
  • 5
1
vote
0 answers

How to get the selected NSMenuItem from a submenu?

I have an API that allows users to create popup menus with sub menus, and I'm having problems detecting the selected item when the user clicks on an option that belongs to a sub menu. So, the display and "construction" of the popup menu is correct…
megamau
  • 33
  • 5
1
vote
1 answer

NSPopUpButtonCell Subclass Animates Closed With Standard Appearance

I've created an NSPopUpButtonCell subclass to customize its appearance. When one of the menu items is selected from the popup it animates the selection with the standard popup appearance on OS X 10.10. I'd like it to animate with my custom…
xizor
  • 1,554
  • 2
  • 16
  • 35
1
vote
1 answer

Dynamically populated NSPopUpButtonCell menu in an NSOutlineView

I’m working with an NSOutlineView which has two columns. My dataSource supplies the outline view with a tree of items of a custom class which represents file types (that is, you initialise it with a UTI). The first column is the display name of the…
Mo.
  • 934
  • 6
  • 8
1
vote
1 answer

Delaying the opening of a NSPopUpButton

I've encountered the same problem as this one: This one. It has never been answered so far. In two words: When you place a NSPopUpButtonCell in a NSTableView, the popUp opens before the selection in the tableView has changed. If the menu of the…
1
vote
1 answer

NSPopupButton, updates depending on another NSPopupButton

I wish to make a city/country selector using 2 NSPopupButtons. One popup button will contain the first part e.g. UK, and the second one will contain the second part e.g. London So the whole city/country combo will read: UK London however, I want the…
Michael
  • 1,477
  • 4
  • 18
  • 27
1
vote
1 answer

How do I manually highlight an NSPopUpButtonCell when drawing it (draw it using white instead of black)?

I've got a custom cell composed out of several cells, one of which is an NSPopUpButtonCell. When drawing my custom cell highlighted, I want to cause all the sub-cells to highlight as well (typically by turning white). With, for example an…
Redwood
  • 66,744
  • 41
  • 126
  • 187
0
votes
1 answer

Reusing NSArrayController in multiple places

I have a simple NSArrayController hooked up to one of my coreData models. I can easily show all the items in a NSTableView without problem, however, if I try to bind a NSTableColumn containing a NSPopUpButtonCell to the arrangedObjects on the same…
Tony
  • 36,591
  • 10
  • 48
  • 83
0
votes
1 answer

What are all the things you can bind to in a NSTableColumn of NSPopupButtonCell?

There are quite a few things you can bind to in a NSTableColumn filled with NSPopupButtonCell, I tried looking around for explanations but couldn't seem to find any. What are each of the binding under value selection for? For example, what's the…
Tony
  • 36,591
  • 10
  • 48
  • 83
0
votes
1 answer

Proper way to populate NSPopUpButtonCell using NSTableViewDataSource

Lets say a Person has many Cars and they have a favorite Car. I cannot seem to find in the docs where it describes the right way to populate the NSPopUpButtonCell in a tableview, differently for each row. For example, I would have 1 row for each…
joels
  • 7,249
  • 11
  • 53
  • 94
0
votes
0 answers

NSTableView reducing width of included NSPopUpButton

I have a NSPopUpButton in a NSTableCellView in a NSTableView. I set the PopUp in IB to the full width of the Column. Running the app, the width of the popup is reduced by 30% on the right side, leaving space in the column and truncating the…
heimi
  • 499
  • 7
  • 16
0
votes
1 answer

How to draw NSPopupButtonCell highlighted image

I have NSPopupButton inside NSToolbar that has borderder = false which is having some color burn blend when highlighted. If I use bordered = true the image is drawn with nice dark overlay. I am trying to achieve to draw highlighted state the same…
Marek H
  • 5,173
  • 3
  • 31
  • 42
0
votes
1 answer

How to change selectItem in NSPopUpButtonCell NSTableView Swift 4.2?

I wanna change index of popUp button in NSTableView. func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? { let dataCell:NSPopUpButtonCell = tableColumn?.dataCell as! NSPopUpButtonCell …
reza_khalafi
  • 6,230
  • 7
  • 56
  • 82
0
votes
1 answer

Problem with NSPopupButtonCell bindings

I'm trying to achieve something similar to the Apple Master-Detail pop-up cell example but the bindings don't seem to be working for me. My app allows users to build up a stageplay; so I have a table view of acts. Each act can have a list of lines…
Mark Pim
  • 9,898
  • 7
  • 40
  • 59
0
votes
1 answer

NSPopUpButton revert to initial state

I register for notification NSPopUpButtonWillPopUpNotification in order to change the pop up menu before it is shown. The new pop up menu consist of running Application list with respected icons. When the application is selected, it calls a…
Dan
  • 1,711
  • 1
  • 22
  • 36