Platforms to show: All Mac Windows Linux Cross-Platform

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

See also:

Feedback, Comments & Corrections

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

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

See also:

Feedback, Comments & Corrections

NSSegmentedControlMBS.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 MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: Creates a new path control with the given size and position.
Example:
dim x as new NSSegmentedControlMBS(0, 0, 100, 100)
Notes: On success the handle property is not zero.

See also:

Feedback, Comments & Corrections

NSSegmentedControlMBS.imageForSegment(segment as Integer) as NSImageMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The image for the specified segment.
Notes:
image: The image to apply to the segment or nil if you want to clear the existing image. Images are not scaled to fit inside a segment. If the image is larger than the available space, it is clipped.
segment: The index of the segment whose image you want to set. This method raises an NSRangeException if the index is out of bounds.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.imageScalingForSegment(segment as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The scaling mode used to display the specified segment's image.
Notes:
scaling: One of the image scaling constants. For a list of possible values, see constants.
segment: The index of the segment whose enabled state you want to get. This method raises an NSRangeException if the index is out of bounds.
Available in Mac OS X v10.5 and later.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.isEnabledForSegment(segment as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The enabled state of the specified segment.
Notes:
True to enable the segment; otherwise, false to disable it.
segment: The index of the segment you want to enable or disable. This method raises an NSRangeException if the index is out of bounds.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.isSelectedForSegment(segment as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The selection state of the specified segment.
Notes:
True if you want to select the segment; otherwise, false.

segment: The index of the segment whose selection state you want to set. This method raises an NSRangeException if the index is out of bounds.

If the receiver allows only a single selection, this method deselects any other selected segments.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.labelForSegment(segment as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The label for the specified segment.
Notes:
label: The label you want to display in the segment. If the width of the string is greater than the width of the segment, the string's text is truncated during drawing.
segment: The index of the segment whose label you want to set. This method raises an NSRangeException if the index is out of bounds.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.makeNextSegmentKey
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: Selects the next segment.
Notes: The next segment is the one to the right of the currently selected segment. For the last segment, the selection wraps back to the beginning of the control.

Feedback, Comments & Corrections

NSSegmentedControlMBS.makePreviousSegmentKey
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: Selects the previous segment.
Notes: The previous segment is the one to the left of the currently selected segment. For the first segment, the selection wraps around to the last segment of the control.

Feedback, Comments & Corrections

NSSegmentedControlMBS.menuForSegment(segment as Integer) as NSMenuMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The menu for the specified segment.
Notes:
menu: The menu you want to add to the segment or nil to clear the current menu. This menu is displayed when the user clicks and holds the mouse button while the mouse is over the segment.
segment: The index of the segment whose menu you want to set. This method raises an NSRangeException if the index is out of bounds.

Adding a menu to a segment allows that segment to be used as a pop-up button.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.selectSegmentWithTag(Tag as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: Selects the segment with the specified tag.
Notes:
tag: The tag associated with the desired segment.
True if the segment was selected successfully; otherwise, false.

Typically, you use Interface Builder to specify the tag for each segment. You may also set this value programmatically using the setTag:forSegment: method of NSSegmentedCell.

Feedback, Comments & Corrections

NSSegmentedControlMBS.tagForSegment(segment as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The tag value for the segment.
Notes:
segment: The index of the segment whose width you want to get. This method raises an NSRangeException if the index is out of bounds.

The tag is an integer you define to identify your items.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.ToolTipForSegment(segment as Integer) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The tool tip for the specified segment.
Notes:
segment: The index of the segment whose tool tip you want to set. This method raises an NSRangeException if the index is out of bounds.

Tool tips are currently not displayed. Apple may change that in the future.
(Read and Write computed property)

Feedback, Comments & Corrections

NSSegmentedControlMBS.widthForSegment(segment as Integer) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Cocoa Controls MBS MacCocoa Plugin 12.1 Yes No No Yes, macOS only No
Function: The width of the specified segment.
Notes:
width: The width of the segment, measured in points. Specify the value 0 if you want the segment to be sized to fit the available space automatically.
segment: The index of the segment whose width you want to set. This method raises an NSRangeException if the index is out of bounds.
(Read and Write computed property)

Feedback, Comments & Corrections

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

The biggest plugin in space...




Links
MBS Xojo blog