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
0
votes
1 answer

How to show last name of user in text field whose first name is selected in pop button, through bindings

I have an array of dictionary which contains two keys- firstName and lastName and their values, eg. firstName/ lastName Steve/ Jobs Andre/ Agassi Christiano/ Ronaldo User interface consists of a pop up button and a text field. I am displaying first…
Devarshi
  • 16,440
  • 13
  • 72
  • 125
0
votes
1 answer

How to save the state of an NSPopUpButton? - Cocoa

I have been searching everywhere for this and not been able to find it and its really bugging me. I can't figure out how to save the current state of an NSPopUpButton, so if a user changes it, the app will load that state next time they run the app.…
doctor_ew
  • 123
  • 2
  • 11
0
votes
1 answer

Why is NSPopupButton item disappearing?

I have an NSPopupButton whose selection index is bound to a property in an NSWindowController subclass. In IB, the button starts out with a couple items. The property's value comes from NSUserDefaults and might be more than the number of items in…
SSteve
  • 10,550
  • 5
  • 46
  • 72
0
votes
1 answer

Binding NSPopUpButton to NSArray

I'm a little lost with bindings on NSPopUpButton. I have a custom class that holds an array of items that I'd like to display in a pop up. These items are subclasses of NSManagedObjects and they are contained in an NSArray. I don't want to use an…
mkko
  • 4,262
  • 3
  • 25
  • 29
0
votes
0 answers

Make Multiple Selections in iOS App Based off Data from Parse Server

My Parse server includes a class of songs. The data from this is Song name, and up to 6 different verses, where each is a string of text. It's set up to be like entry[@"SongName"] and entry[@"VERSE1"] leading all the way up to 6 verses. Some will…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
1 answer

NSValueTransformer for NSPopupButton on CoreData integer attribute

I have a CoreData/SQLite app with an NSPopupButton presenting the possible values for some entity attribute (an integer). It automatically shows the attribute value in the database. The user must be able to assign another value so my code generates…
user886832
0
votes
2 answers

NSPopUpButton, NSComboBox similar menu

I'm trying to create a menu with a drop down menu with a custom background for every cell. First i tried to adapt NSPopUpButton but i couldn't find a way to change the cells background image. Using setImage: would slide the text to the right of the…
Horatiu
  • 11
  • 1
  • 3
0
votes
1 answer

How to customize a NSPopUpButton and its NSMenu?

I want to style a NSPopUpButton with my own colors. I've gotten pretty much everything else to work except for the caps at the top and bottom of the menu and I can't get the NSPopUpButton to show an image. Here are a few screenshots of the…
Melodius
  • 2,505
  • 3
  • 22
  • 37
0
votes
0 answers

How do I automatically reduce the width of an NSPopUpButton to the currently shown text's width?

I have an NSPopUpButton that, by default, is as wide as necessary to fit the widest text in its menu. Now I need the control to resize itself depending on the currently chosen (shown) menu item. For example, if the menu contains A XXXXXXXXXX And…
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
0
votes
1 answer

Changing Font Size of Japanese (Unicode) characters

I have a NSPopUpButton which contains either English or Japanese Strings read from a plist file according to the System's Language. Now when the Language is English I am able to change the font size by using code such as - [auxStatePopup setFont:…
abhihello123
  • 1,668
  • 1
  • 22
  • 38
0
votes
1 answer

Custom nspopupbutton title when using bindings and struct

How to display timezone identifier with bindings (using structs)? e.g. instead of Africa/xxx offset 3600 i want Africa/xxx only class TimezonePopupButton: NSPopUpButton { private var timezonesController: NSArrayController =…
Marek H
  • 5,173
  • 3
  • 31
  • 42
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 make `NSPopUpButton` with `NSControl.ControlSize.mini` programmatically?

I tried setting controlSize, and it didn't work. I tried setting NSMenuItem.attributedTitle, and it didn't work. Setting NSMenuItem.attributedTitle made text smaller, but didn't make checkmarks smaller. Therefore result looks broken. Here's code…
eonil
  • 83,476
  • 81
  • 317
  • 516
0
votes
1 answer

Setting Programmatic Actions for NSPopUpButton

This is a very simple... confusing thought question. I'm a bit confused as to how calls work with NSObjects, and I can't seem to get this to work at all (despite being... what I assume, very simple). I've create an NSViewController with a matching…
Misha Stone
  • 631
  • 7
  • 22
0
votes
2 answers

Swift NSPopUpButton enum

I'm implementing an NSPopUpButton (for a macOS app using Swift), as in the picture: And, I have the following code, which actually works: enum Importance: Int8 { case EXTREMELY_IMPORTANT = 5 case VERY_IMPORTANT = 4 case IMPORTANT = 3 case NORMAL =…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84