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
1
vote
1 answer

NSComboBox - trap return key

In my app I display a sheet with an NSComboBox in it. If the user uses the arrow keys to choose an entry from the menu and then Return to select it the sheet's OK button is also actioned, as it has Return as its key equivalent. I'd like to stop…
Rev. Andy
  • 81
  • 1
  • 5
1
vote
1 answer

NSComboBox Object Types

I'm pretty new to Cocoa, and I have an NSComboBox which I'm populating with an NSComboBoxDataSource. So far so good, but the one thing I haven't been able to figure out is what type of objects can be stored. I've had success with strings, but I'd…
Benjineer
  • 1,530
  • 18
  • 22
1
vote
2 answers

NSComboBox action selector fires when setHidden:YES

I have an NSComboBox. I've set an action selector. When the box gets hidden the selector fires, even if the user never touched it. Yes, I need to hide it. IBOutlet NSComboBox *comboBox; [comboBox setAction:@selector(onComboBoxSelection:)]; -…
estobbart
  • 1,137
  • 12
  • 28
1
vote
1 answer

NSComboBox Binding so it calls selectItematIndex instead of just displaying property value

I have a NSCombobox that is binded to an Object Controller. The Object Controller is an instance of an (custom) Employee Class that is created via RestKit's object serialization framework. The NSComboBox's Value is binded to a key path employeeType,…
1
vote
1 answer

NSComboBox list scrolled to the bottom by default

I have a NSComboBox that is completely standard. It has a data source set up that feeds it content, which works fine. The issue is that when the user clicks to view the list, it is starting scrolled all the way to the bottom of the list instead of…
raphael
  • 447
  • 4
  • 17
1
vote
1 answer

how to catch when the NSTextView in a NSComboBox gets first responder status

I try to do some treatment when a NSComboBox looses first responder status, and hence gets "resignFirstResponder", however my treatment should happen only when the combobox really loose the first responder status, not when the internal NSTextView…
armel
  • 2,497
  • 1
  • 24
  • 30
1
vote
1 answer

NSComboBox With File Selection

I would like to create an NSComboBox like the following: Before Click: After Click: I understand that this comboBox can be achieved by using Java. I created a quick JFrame, added a JCombobox, and got the same look! But my question is: How can I…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
0
votes
1 answer

NSCombobox, NSTimer

I have the code for timer with time interval 5 seconds. Is there an easy way to control the time interval with NSCombobox or something similar? Let's say: I would like to choose the timer interval from 1 to 5 seconds in the Combo Box. [NSTimer…
Damijan
  • 183
  • 1
  • 2
  • 7
0
votes
0 answers

NSComboBox does not display any text

I have a NSViewController with multiple NSComboBox instances. I have the following code that adds the items to the NSComboBox and then selects an item: @IBOutlet weak var monitors: NSComboBox! fileprivate func fillMonitors() { …
inexcitus
  • 2,471
  • 2
  • 26
  • 41
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
0 answers

NSComboBox text changed event not firing when selecting from popup

I am working on code that dynamically builds a window from scratch in macOS. I would like to add NSComboBox to the list of supported controls. I am using a generic window delegate that contains a window controller that handles all the events for all…
rpatters1
  • 382
  • 1
  • 11
0
votes
1 answer

Why is NSComboBox content in the incorrect position?

I'm trying to layout an NSComboBox in a Mac app and I'm getting some weird behaviour. In reality I've got a view which has an NSComboBox as a subview along with some other subviews, but I've created a simple example to display the same issue I'm…
ADB
  • 591
  • 7
  • 21
0
votes
2 answers

NSComboBox into NSAlert

First of all I'm kind of new in Objc. (so try to explain me like. . . for dummies XD) Well my question is: Is there any way to show a NSComboBox inside a NSAlert? that's it! I've check the documentations, an it says that it is possible to show a…
Ordiel
  • 2,442
  • 3
  • 36
  • 52
0
votes
2 answers

What wiring code is necessary to wrap NSComboBox with NSViewRepresentable?

I am trying to wrap NSComboBox with NSViewRepresentable for use in SwiftUI. I would like to pass in both the list of dropdown options and the text value of the combo box as bindings. I would like the text value binding to update on every keystroke,…
kamcma
  • 203
  • 3
  • 5
0
votes
1 answer

Expanding NSComboBox (selectable) to fill width of GridView Cell

I am struggling to get an NSComboBox to fill the width of a GridViewCell when the Combo is in "selectable" mode - when it's "editable" it behaves as required. When selectable the box simply displays as the width of the currently selected item - it's…