Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSComboBoxMBS class.
NSComboBoxMBS.addItemWithObjectValue(value as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
anObject: The object to add to the internal item list.
This method logs a warning if usesDataSource returns true.
Some examples using this method:
NSComboBoxMBS.completes as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns true if the receiver tries to complete what the user types in the text field; otherwise false.
(Read and Write computed property)
Some examples using this property:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSComboBoxMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The handle is casted to a NSComboBox and the plugin retains this handle.
See also:
NSComboBoxMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSComboBoxMBS.deselectItemAtIndex(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
index: The index of the item to deselect.
If the selection does in fact change, this method posts an NSComboBoxSelectionDidChangeNotification to the default notification center.
Some examples using this method:
NSComboBoxMBS.hasVerticalScroller as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns true if the receiver will display a vertical scroller; otherwise false.
Note that the scroller will be displayed even if the pop-up list contains fewer items than will fit in the area specified for display.
(Read and Write computed property)
NSComboBoxMBS.indexOfItemWithObjectValue(value as Variant) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
anObject: The object for which to return the index.
Returns the lowest index in the internal item list whose corresponding value is equal to that of the specified object. Objects are considered equal if they have the same id or if isEqual returns true.
If none of the objects in the receiver's internal item list are equal to anObject, indexOfItemWithObjectValue returns NSNotFound (-1).
This method logs a warning if usesDataSource returns true.
Some examples using this method:
NSComboBoxMBS.indexOfSelectedItem as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns the index of the last item selected from the receiver's pop-up list or -1 if no item is selected.
Note that nothing is initially selected in a newly initialized combo box.
NSComboBoxMBS.intercellSpacing as NSSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Returns the space between cells in the pop-up list. The default spacing is (3.0, 2.0).
(Read and Write computed property)
NSComboBoxMBS.isButtonBordered as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
True if the button has a border; otherwise false.
Available in Mac OS X v10.3 and later
(Read and Write computed property)
Some examples using this property:
NSComboBoxMBS.itemHeight as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The default item height is 16.0.
(Read and Write computed property)
Some examples using this property:
NSComboBoxMBS.noteNumberOfItemsChanged
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method allows the receiver to update the scrollers in its displayed pop-up list without actually reloading data into the receiver. It is particularly useful for a data source that continually receives data in the background over a period of time, in which case the NSComboBox can remain responsive to the user while the data is received.
See the NSComboBoxDataSource informal protocol specification for information on the messages an NSComboBox sends to its data source.
Some examples using this method:
NSComboBoxMBS.numberOfItems as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSComboBoxMBS.numberOfVisibleItems as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The maximum number of items visible at any one time in the pop-up list.
(Read and Write computed property)
Some examples using this property:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method logs a warning if usesDataSource returns true.
NSComboBoxMBS.removeItemAtIndex(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
index: The index of the object to remove. All items beyond index are moved up one slot to fill the gap.
The removed object receives a release message. This method raises an NSRangeException if index is beyond the end of the list and logs a warning if usesDataSource returns true.
NSComboBoxMBS.removeItemWithObjectValue(value as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
anObject: The object to remove from the internal item list. Objects are considered equal if they have the same id or if isEqual: returns true.
This method logs a warning if usesDataSource returns true.
Some examples using this method:
NSComboBoxMBS.scrollItemAtIndexToTop(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
index: The index of the item to scroll to the top.
The pop-up list need not be displayed at the time this method is invoked.
Some examples using this method:
NSComboBoxMBS.scrollItemAtIndexToVisible(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
index: The index of the item to make visible.
The pop-up list need not be displayed at the time this method is invoked.
Some examples using this method:
NSComboBoxMBS.selectItemAtIndex(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
index: The index of the item to select in the pop-up list.
Posts an NSComboBoxSelectionDidChangeNotification to the default notification center if the selection does in fact change. Note that this method does not alter the contents of the combo box's text field—see Setting the Combo Box's Value for more information.
NSComboBoxMBS.selectItemWithObjectValue(value as Variant)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
anObject: The object to select in the pop-up list. Objects are considered equal if they have the same id or if isEqual: returns true.
This method logs a warning if usesDataSource returns true. Posts an NSComboBoxSelectionDidChangeNotification to the default notification center if the selection does in fact change. Note that this method doesn't alter the contents of the combo box's text field—see Setting the Combo Box's Value for more information.
Some examples using this method:
NSComboBoxMBS.usesDataSource as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Controls | MBS MacControls Plugin | 10.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
True if the receiver uses an external data source to populate the receiver's pop-up list, false if it uses an internal item list.
(Read and Write computed property)
Some examples using this property:
The items on this page are in the following plugins: MBS MacControls Plugin.