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
6
votes
2 answers

Using NSPopUpButtonCell with NSTableView

Hello I am trying to use a NSPopUpButtonCell inside an NSTableView. Basically when you select an item in the pop up I want it displayed in the table view column/row. When an item in the popup cell is pressed I store it inside the data source using…
David
  • 14,205
  • 20
  • 97
  • 144
5
votes
1 answer

How to display an NSMenu embedded in a NSPopover?

Is there a way to have an NSMenu like object displayed as content of a NSPopover? Essentially I'd like to reproduce what macOS Dock does when you right click on an app icon (I don't mind about the dark background here, I'm only interested in having…
ggould75
  • 880
  • 2
  • 14
  • 23
4
votes
2 answers

NSPopUpButtonCell with hierarchical menu in NSTableView

I have an NSTableView of which one column contains NSPopUpButtonCells. This column is assigned to an IBOutlet. My application's controller class creates a menu in it's init and assigns it to the NSTableColumn's dataCell, which is the…
nephilim
  • 129
  • 2
  • 8
3
votes
0 answers

MacOS views rendering same font differently

I did a mockup project that contains solely three views: NSTextField NSPopUpButton NSDatePicker All of them with the same font System - Regular, 13. However, as you can notice by the attached image, the fonts are different on each of the views. Is…
dwbrito
  • 5,194
  • 5
  • 32
  • 48
3
votes
2 answers

NSPopUpButton White text

I have created a NSPopUpButton in my app in a custom view which has a black fill. I would now like to make the NSPopUpButton have a white text color but I do not seem to be able to do this. How should I go about doing this? Thanks
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
3
votes
2 answers

Getting duplicate header button cell in NSTableView when using NSPopUpButtonCell

I have a dynamic NSTableView which can add a number of columns depending on the data provided. For each column I have set the header cell to be a NSPopUpButtonCell. (Side-note: I've had to use a custom subclass class for NSTableHeaderView otherwise…
David Douglas
  • 10,377
  • 2
  • 55
  • 53
3
votes
1 answer

NSPopUpButton with InlineButton style logs "Unknown bezel style 15 and/or control size 1"

I have an NSPopUpButton with Inline Button style. When mouse enters, exits or mouse down or mouse up, it logs "Unknown bezel style 15 and/or control size 1" 15 is the NSInlineButtonStyle from NSButtonCell.h typedef NS_ENUM(NSUInteger, NSBezelStyle)…
uchuugaka
  • 12,679
  • 6
  • 37
  • 55
3
votes
2 answers

Resize NSPopupButton to its selected title

I've a NSPopupButton and I want it so resize itself to fit the selected title. [NSPopupButton sizeToFit] doesn't fit my needs because the popup is resized to the largest title item not to the current selected one I've tried in may ways without…
dafi
  • 3,492
  • 2
  • 28
  • 51
2
votes
2 answers

NSPopUpButtonCell inside custom NSCell does not change selection when item is selected from menu

I have an NSPopUpButtonCell inside a custom NSCell and I'm using - (BOOL)startTrackingAt:(NSPoint)startPoint inView:(NSView *)controlView to produce the pop up menu when it's clicked. I have also overridden copyWithZone: in my custom cell to copy…
Redwood
  • 66,744
  • 41
  • 126
  • 187
2
votes
1 answer

Why is NSPopUpButtonCell showing correctly when only setObjectValue:nil is called?

An NSTableView has multiples NSCells (indirectly via NSTableColumn). NSCell follows the Flyweight design pattern; they're cookie-cutters. There's one cell per column and it's asked to draw itself for each row. "Here's a value, draw it on the…
user1040049
2
votes
0 answers

Swift: NSPopUpButtonCell in NSTableHeaderCell

I cannot for the life of my figure out how to get an NSPopUpButtonCell to work in a NSTableHeaderCell. I've tried to implement the solution here: Getting duplicate header button cell in NSTableView when using NSPopUpButtonCell but it seems some of…
Chris
  • 1,005
  • 1
  • 13
  • 27
2
votes
2 answers

How do I make an NSPopupButton that has a menu with images AND text?

I have a list of applications and I'd like to make an NSPopupButton that shows a menu of application names with their icon to the left of each item. I've been able to bind the NSPopupButton to my array of items, but there isn't a binding entry for…
Michael Bishop
  • 4,240
  • 3
  • 37
  • 41
1
vote
1 answer

NSPopUpButtonCell inside custom cell does not pop up when clicked

I've created a custom subclass of NSCell with an NSImageCell, some NSTextFieldCells, and an NSPopUpButtonCell. I'm initializing the pop up cell using: myPopUpCell = [[NSPopUpButtonCell alloc] init]; [myPopUpCell setBordered:NO]; …
Redwood
  • 66,744
  • 41
  • 126
  • 187
1
vote
1 answer

How to retrieve the current selection of an NSPopUpButtonCell?

I am using an NSPopUpButtonCell in an NSTableView. The popup button has a binding to an NSArray property offered by the ApplicationDelegate. When I select a menu item of the popup button I expect to retrieve the current selection or its index. I…
JJD
  • 50,076
  • 60
  • 203
  • 339
1
vote
1 answer

NSTableView with Dropdown Menu and having Image inside Menu

Yes, is it possible to have: A table having two column ( Should be easy) One of Cell should have image and that should be selectable from Drop - down menu By googling what i came to know it has to be of type NSPopupButtonCell type, but i want…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
1
2 3