A kind of MacOS control that allows you to either enter text directly (as you would with an NSTextField) or click the attached arrow at the right of the combo box and select from a displayed (“pop-up”) list of items.
Questions tagged [nscombobox]
120 questions
1
vote
1 answer
How to make Swift NSComboBox return an array from a multi-dimensional array per line
I've got an NSComboBox in my app, and I'd like it to display the contents of an array per line from a multi-dimensional array, rather than an element from a one-dimensional array.
My ViewController conforms to NSComboBoxDataSource, has the two…

ADB
- 591
- 7
- 21
1
vote
1 answer
How Can I Add Item to macOS NSComboBox with Xamarin & C#?
I'm using Xamarin & C# to develop a macOS application. I have a NSComboBox in the storyboard. It have an outlet, so i can access to it successfully.
I have an data context which populated in a list like this:
public static List…

berkb
- 542
- 6
- 21
1
vote
1 answer
How Can I Clear Selection of NSComboBox in Swift or Objective-C?
We can clear the selection of ComboBox coding this:
combobox.SelectedIndex=-1;
with C# on Windows.
However, it this coding methodology cannot run for macOS and iOS NSComboBox with Swift or Objective - C. What is the real solution ? Thanks.

berkb
- 542
- 6
- 21
1
vote
1 answer
Cocoa Not Calling ViewController Function
I built a viewcontroller with a combobox that has the completion option so that when I type a letter, it finds the first occurence in the list starting with that letter. It works fine. I then copied the code to another view controller and changed…

curt
- 4,422
- 3
- 42
- 61
1
vote
1 answer
Populate NSComboBox from Data Source
This code compiles OK, but the ComboBox (cbxColors) is empty - not populated from the Data Source (array: COLORS_OF). Uses Data Source is checked in IB.
func numberOfItemsInComboBox() returns the correct result: 5.
func comboBox() is not doing its…

San Lewy
- 136
- 1
- 3
- 13
1
vote
1 answer
Fully clickable NSComboBox?
In the Cocoa UI controls we have the NSComboBox and I'm wondering if it can be set to act like the 'combo boxes' that Apple uses in the OSX System Preferences. These are fully clickable (instead of only the right-most arrow part) and they also look…

BadmintonCat
- 9,416
- 14
- 78
- 129
1
vote
3 answers
Cocoa osx NSCombobox align items center
In my application for osx i have a NSCombobox which shows a list of items.
My problem is that all of those items are always aligned to the left and I need that the last item stay center aligned. I know that in the interface builder user can set the…

user3065901
- 4,678
- 11
- 30
- 52
1
vote
1 answer
Blank NSComboBox on OS X Yosemite
I have a set of NSComboBox elements shown within the toolbar of an NSPanel, all created with XCode/Interface Builder. When I click on them on Yosemite, all I can see is a black box where the combo box items should be. On earlier versions of OS X…

Pablo D.
- 620
- 6
- 15
1
vote
1 answer
NSMenu canelTracking is not working on Mac OSx 10.5
I m using NSComboBox inside NSMenu to show a list of items. When I choose any option in NSComboBox menu should get dismissed.
To dismiss NSMenu I m using cancelTrackingWithoutAnimation for 10.6 and above and it works fine. In case of 10.5 i am…

Akhil Shrivastav
- 427
- 3
- 13
1
vote
1 answer
Sorting data for NSComboBox
ALL,
In my application I need to use NSComboBox. The data the combo box will display needs to be sorted.
However looking at the Apple documentation I don't see the way to make the control to have a SORT style.
Can anybody familiar with the API point…

Igor
- 5,620
- 11
- 51
- 103
1
vote
1 answer
NSComboBox - problems with background when selected
I'm a iOS developer, and recently I'm programming a desktop APP for MAC OSX. I still don't have much experience with the View's components of OSX, so maybe it's a silly or easy question, but I have made a little research about this problem and…

Lucas Eduardo
- 11,525
- 5
- 44
- 49
1
vote
0 answers
NSComboBox horizontal scroll
Is it possibile to set an horizontal scroller to an NSComboBox? I've tried wraps, scrolls or truncates but they don't allow the horizontal scrolling. I have an NSComboBox that displays a long line of text (longer than the NSComboBox lenght) and it…

Val K.
- 113
- 1
- 10
1
vote
2 answers
Change NSComboBox drop down menu background color
I am coming from iOS/Android programming background and working on my first MAC application. I am using an NSComboBox to list some item that user can choose but having some trouble setting the background color of the drop down menu.
What I have…

Krishnabhadra
- 34,169
- 30
- 118
- 167
1
vote
2 answers
NSComboBox value getting and assigning it to a label
I am new to Mac development. I want to get the value selected from a combo box and assign it to the text of a label in a Mac app using Objective-C. How can I do this?

Sharad Mhaske
- 1,103
- 9
- 19
1
vote
0 answers
comboBoxWillPopUp never called
I've implemented the comboBoxWillPopUp delegate method, but it is never called when I open the NSComboBox's popup.
Other delegate methods, such as comboBoxSelectionDidChange, implemented in the same class, are called as expected, so the comboBox…

Wienke
- 3,723
- 27
- 40