Questions tagged [nscombobox]

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.

120 questions
10
votes
7 answers

How to programmatically open an NSComboBox's list?

I've been around this for a while.. I thought this should be an easy task, but it isn't =D What I am trying to do, is to display the combobox's list when the user clicks the combobox but not specifically in the button. Any Idea? Thanks in advance!
Omer
  • 5,470
  • 8
  • 39
  • 64
7
votes
4 answers

comboBoxSelectionDidChange gives me previously selected value

I am using this notification for NSComboBox. Only problem is when I select a different item in the dropdown it always show previously selected value in the combo box. How can I get the currently selected value. I need to make some controls…
Leo
  • 1,547
  • 3
  • 24
  • 40
5
votes
0 answers

NSComboBox with image and sections

How to make a NSComboBox with sections and icons, like the image picker of Xcode?
Vinicius Jarina
  • 797
  • 5
  • 16
4
votes
3 answers

Hide/disable NSComboBox button

Is there a way to hide the pop-up button of an NSComboBox? I can't find anything in the documentation for NSComboBox or NSComboBoxCell. There is a setButtonBordered: method on NSComboBox, but this just changes to an alterate button style. If I can't…
alexantd
  • 3,543
  • 3
  • 27
  • 41
4
votes
1 answer

NSComboBox data sources and reloadData

I have an NSCombobox in my app and I have a datasource set up for it. IBOutlet NSComboBox *comboBox; I also specify at some point in my program: [comboBox reloadData]; My thought would be that after this call, I should get calls to these…
JPC
  • 8,096
  • 22
  • 77
  • 110
4
votes
1 answer

NSComboBox getGet value on change

I am new to OS X app development. I manage to built the NSComboBox (Selectable, not editable), I can get it indexOfSelectedItem on action button click, working fine. How to detect the the value on change? When user change their selection, what kind…
David Evony
  • 273
  • 3
  • 15
4
votes
1 answer

How can I get a populated combobox to display its options in Swift?

With this code I'm able to populate the items in an NSComboBox, but the combobox itself is always empty when you expand it in the app. The number of items being logged is accurate. I know this is rather basic, but I've read and re-read the docs at…
Charlie Schliesser
  • 7,851
  • 4
  • 46
  • 76
4
votes
1 answer

Any example about custom NSComboBox?

I am asked to implement an combo box like this: It is clear that this is quite different from NSComboBox: <1> The button of beside the text field should be customized <2> This is much more important: there is an additional "cross" (which is a…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
4
votes
1 answer

Set tool tip for NSComboBox items

How can i show tool tip for NSComboBox items while hovering mouse as they are too long to be displayed?. I have tried by setting allow expansion tool tip but it is not showing. For TableView and text filed this is working. So what can i do?
Anil Varghese
  • 42,757
  • 9
  • 93
  • 110
4
votes
1 answer

NSComboBox - Obtaining selected information and NSComboBoxDataSource

For the life of me, I am being continually stumped with NSComboBox. I created an object that conforms the NSComboBoxDataSource protocol, and implemented: - (NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox; - (id)comboBox:(NSComboBox…
MarkPowell
  • 16,482
  • 7
  • 61
  • 77
3
votes
4 answers

NSComboBox in NSToolbar via IB throws exception

I want an NSComboBox in an NSToolbar. I do it via IB and Xcode 4.2. I can place the comboBox in the toolbar and start the program. The first time - and only the first time - the app starts, I get the following exception when I set the focus in the…
3
votes
1 answer

How to get NSComboBox in a NSToolbar to send messages to the datasource and delegate

I have an NSComboBox in a NSToolbar and I want the combo box to send messages to its datasource and delegate. My class adopts the NSComboBoxDelegate and NSComboBoxDataSource protocols. I create my combo box like this NSRect comboBoxRect =…
David
  • 14,205
  • 20
  • 97
  • 144
3
votes
2 answers

How to know which NSCombobox selector calling the Delegate

I have the following code written in SWIFT for OS X App, the code is working fine (NSComboBox are select able only, not editable) I have these two IBOutlet projNewProjType and projNewRouter, when I change the the selection of either of the…
David Evony
  • 273
  • 3
  • 15
3
votes
1 answer

How to handle backspace in NSComboBox with swift 5

I have NSComboBox with external datadource and I'm using method: (NSString *)comboBox:(NSComboBox *)aComboBox completedString:(NSString *)string to complete string with suggestions, everything is working all right except when I press backspace, it…
Zuzana Paulis
  • 941
  • 1
  • 8
  • 19
3
votes
2 answers

NSComboBox - item selected action?

is there an IBAction for item selection in NSComboBox? I trying to define 2 different actions - one for item selected from the drop box, and another action for entering a new value. is that possible? *I'm doing a mac app, not iOS
Aviram Netanel
  • 12,633
  • 9
  • 45
  • 69
1
2 3 4 5 6 7 8