Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

NSControlMBS.ActionSelector as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 13.5 Yes No No Yes, macOS only No
Function: The name of the selector.
Notes:
The new action-message selector to associate with the receiver's cell. Specify NULL to prevent action messages from being sent to the receiver's target.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.alignment as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 8.0 Yes No No Yes, macOS only No
Function: The alignment mode of the text in the view's cell.
Example:
dim n as NSControlMBS // your control
n.alignment=3
Notes:
One of the following constants: NSLeftTextAlignment, NSRightTextAlignment,NSCenterTextAlignment, NSJustifiedTextAlignment, or NSNaturalTextAlignment. The default value is NSNaturalTextAlignment.

Constants:

NSLeftTextAlignment = 0
Text is visually left aligned.

NSRightTextAlignment = 1
Text is visually right aligned.

NSCenterTextAlignment = 2
Text is visually center aligned.

NSJustifiedTextAlignment = 3
Text is justified.

NSNaturalTextAlignment = 4
Use the natural alignment of the text's script.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.attributedStringValue as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 8.0 Yes No No Yes, macOS only No
Function: The value of the view's cell as an attributed string.
Notes:
The value of the cell interpreted as an attributed string, or an empty attributed string if the receiver has no cell.

If the control contains many cells (for example, NSMatrix), then the value of the currently selected cell is returned. If the control is in the process of editing the affected cell, then it invokes the validateEditing method before extracting and returning the value.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.baseWritingDirection as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: The initial writing direction used to determine the actual writing direction for text.
Notes:
One of the following values: NSWritingDirectionNatural, NSWritingDirectionLeftToRight, or NSWritingDirectionRightToLeft. The default value is NSWritingDirectionNatural.

The Text system uses this value as a hint for calculating the actual direction for displaying Unicode characters. You should not need to call this method directly.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.calcSize
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 9.1 Yes No No Yes, macOS only No
Function: Recomputes any internal sizing information for the receiver, if necessary.
Notes: This method uses the calcDrawInfo method of its cell to perform the calculations. Most controls maintain a flag that informs them if any of their cells have been modified in such a way that the location or size of the cell should be recomputed. If such a modification happens, this method is automatically invoked before the control is displayed. You should never need to invoke it yourself.

Feedback, Comments & Corrections

NSControlMBS.cell as Variant
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 11.1 Yes No No Yes, macOS only No
Function: The receiver's cell object.
Notes:
Cocoa controls often have a frame control and inside a Cell which implements the raw functionality. This way you can for example have a table which embeds such cell controls inside the table cells.

Use this method with great care as it can irrevocably damage the affected control; specifically, you should only use this method in initializers for subclasses of NSControl.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.ConnectActionEvent
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Connects the action event.
Notes: If you want to use addhandler with this class and the action event, you need to call ConnectActionEvent after addhandler to actually have the plugin put things in place for handling the event.

Feedback, Comments & Corrections

NSControlMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 10.3 Yes No No Yes, macOS only No
Function: Creates a new control with size 100/100 and position 0/0
Example:
dim t as new NSControlMBS
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSControlMBS.Constructor(Handle as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 10.3 Yes No No Yes, macOS only No
Function: Creates an object based on the given NSControl handle.
Example:
dim t as new NSControlMBS(0, 0, 100, 100)
dim v as new NSControlMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)
Notes: The handle is casted to a NSControl and the plugin retains this handle.

See also:

Feedback, Comments & Corrections

NSControlMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 10.3 Yes No No Yes, macOS only No
Function: Creates a new control with the given size and position.
Example:
dim x as new NSControlMBS(0, 0, 100, 20)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSControlMBS.currentEditor as NSTextMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Returns the current field editor for the control.
Notes:
Returns the field editor for the current control, or nil if the receiver does not have a field editor.

When the receiver is a control displaying editable text (for example, a text field) and it is the first responder, it has a field editor, which is returned by this method. The field editor is a single NSTextView object that is shared among all the controls in a window for light text-editing needs. It is automatically instantiated when needed.

Feedback, Comments & Corrections

NSControlMBS.Destructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 13.0 Yes No No Yes, macOS only No
Function: The destructor.

Feedback, Comments & Corrections

NSControlMBS.doubleValue as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: The double value of the control.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.EnableEvents
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 13.4 Yes No No Yes, macOS only No
Function: Enables events after you assigned methods to them with AddHandler.

Feedback, Comments & Corrections

NSControlMBS.font as NSFontMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 10.3 Yes No No Yes, macOS only No
Function: The font used to draw text in the receiver's cell.
Notes:
f the cell is being edited, the text in the cell is redrawn in the new font, and the cell's editor (the NSText object used globally for editing) is updated with the new font object.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.ignoresMultiClick as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 8.0 Yes No No Yes, macOS only No
Function: A Boolean value indicating whether the receiver ignores multiple clicks made in rapid succession.
Example:
dim n as NSControlMBS // your control
n.ignoresMultiClick=True
Notes:
True if the view ignores multiple clicks; otherwise, false.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.integerValue as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: The value of the receiver's cell as an Integer value.
Notes:
If the control contains many cells (for example, NSMatrix), then the value of the currently selected cell is returned. If the control is in the process of editing the affected cell, then it invokes the validateEditing method before extracting and returning the value.

Available in OS X v10.5 and later.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.intValue as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: The integer value of the control.
Example:
dim n as new nsbuttonMBS(0,0,100,100)

n.intValue=1
MsgBox str(n.intValue) // shows 1
n.intValue=0
MsgBox str(n.intValue) // shows 0
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.isContinuous as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: Whether the receiver's cell sends its action message continuously to its target during mouse tracking.
Notes:
True if the action message should be sent continuously; otherwise, false.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.isEnabled as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: Whether the receiver reacts to mouse events.
Notes:
True if the view responds to mouse events; otherwise, false.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.performClick
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Simulates a single mouse click on the receiver.
Notes: This method calls the performClick method of the receiver's cell. This method raises an exception if the action message cannot be successfully sent.

Feedback, Comments & Corrections

NSControlMBS.refusesFirstResponder as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Whether the receiver refuses the first responder role.
Notes:
By default, the user can advance the focus of keyboard events between controls by pressing the Tab key; when this focus—or first responder status—is indicated for a control (by the insertion point or, for nontext controls, a faint rectangle), the user can activate the control by pressing the Space bar.
(Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.selectCell(Cell as NSCellMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Selects the specified cell and redraws the control as needed.
Notes:
Cell: The cell to select. The cell must belong to the receiver.

If the cell is already selected (or does not belong to the receiver), this method does nothing. If the cell belongs to the receiver and is not selected, this method changes its state to NSOnState and redraws the cell.

Feedback, Comments & Corrections

NSControlMBS.selectedCell as NSCellMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 12.5 Yes No No Yes, macOS only No
Function: Returns the receiver's selected cell.
Notes: The default implementation of this method simply returns the control's associated cell (or nil if no cell has been set). Subclasses of NSControl that manage multiple cells (such as NSMatrix and NSForm) must override this method to return the cell selected by the user.

Feedback, Comments & Corrections

NSControlMBS.selectedTag as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 8.0 Yes No No Yes, macOS only No
Function: The tag of the views's selected cell.

Feedback, Comments & Corrections

NSControlMBS.setNeedsDisplay
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 9.1 Yes No No Yes, macOS only No
Function: Marks the receiver as needing redisplay (assuming automatic display is enabled).
Notes: This method also recalculates the dimensions of the control as needed.

Feedback, Comments & Corrections

NSControlMBS.sizeToFit
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS Cocoa Plugin 9.1 Yes No No Yes, macOS only No
Function: Resizes the receiver's frame so that it is the minimum size needed to contain its cell.
Notes: If you want a multiple-cell custom subclass of NSControl to size itself to fit its cells, you must override this method. This method neither redisplays the receiver nor marks it as needing display. You must do this yourself with either thedisplay or setNeedsDisplay method.

Feedback, Comments & Corrections

NSControlMBS.stringValue as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: The string value of the control.
Notes: (Read and Write computed property)

Feedback, Comments & Corrections

NSControlMBS.tag as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS Cocoa Plugin 7.8 Yes No No Yes, macOS only No
Function: The tag identifying the object.
Notes:
You can set this property to the value you need.
(Read and Write computed property)

Feedback, Comments & Corrections

Next items

The items on this page are in the following plugins: MBS Cocoa Plugin.




Links
MBS Xojo tutorial videos