Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSColorPanelMBS.attachColorList(list as NSColorListMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Attaches the given color list to the panel.
Notes: An application should use this method to add an NSColorList saved with a document in its file package or in a directory other than NSColorList's standard search directories.

Feedback, Comments & Corrections

NSColorPanelMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 8.4 Yes No No Yes, macOS only No
Function: The constructor to create a new color panel.

Feedback, Comments & Corrections

NSColorPanelMBS.detachColorList(list as NSColorListMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Detaches the color list from the panel.

Feedback, Comments & Corrections

NSColorPanelMBS.GetColor(byref red as single, byref green as single, byref blue as single, byref alpha as single) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: The current color in the RGB color model.
Notes:
Values from 0.0 to 1.0.
Returns true if the values are valid.

See also:

Feedback, Comments & Corrections

NSColorPanelMBS.SetColor(red as single, green as single, blue as single, alpha as single)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Sets the color.
Notes: Values from 0.0 to 1.0.

See also:

Feedback, Comments & Corrections

NSColorPanelMBS.setColor(value as NSColorMBS)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Sets the color.

See also:

Feedback, Comments & Corrections

NSColorPanelMBS.setContinuous(value as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Whether you want to receive Changed events while the user chooses the color.
Notes: Set value to true to have the receiver calls the Changed event continuously as the color of the NSColorPanel is set by the user; otherwise false.

Feedback, Comments & Corrections

NSColorPanelMBS.setMode(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Sets the mode of the panel the mode is one of the modes allowed by the color mask.
Notes:
Constants:

const NSGrayModeColorPanel= 0
const NSRGBModeColorPanel= 1
const NSCMYKModeColorPanel= 2
const NSHSBModeColorPanel= 3
const NSCustomPaletteModeColorPanel= 4
const NSColorListModeColorPanel= 5
const NSWheelModeColorPanel= 6
const NSCrayonModeColorPanel= 7

Feedback, Comments & Corrections

NSColorPanelMBS.SetPickerMode(value as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Specifies the color panel's initial picker.
Notes:
Constants:
NSColorPanelGrayModeMask= &h00000001
NSColorPanelRGBModeMask= &h00000002
NSColorPanelCMYKModeMask= &h00000004
NSColorPanelHSBModeMask= &h00000008
NSColorPanelCustomPaletteModeMask= &h00000010
NSColorPanelColorListModeMask= &h00000020
NSColorPanelWheelModeMask= &h00000040
NSColorPanelCrayonModeMask= &h00000080
NSColorPanelAllModesMask= &h0000ffff

Feedback, Comments & Corrections

NSColorPanelMBS.setShowsAlpha(value as boolean)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: Tells the panel whether or not to show alpha values and an opacity slider.
Notes: Note that calling the NSColor method setIgnoresAlpha with a value of true overrides any value set with this method.

Feedback, Comments & Corrections

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




Links
MBS Xojo tutorial videos