Platforms to show: All Mac Windows Linux Cross-Platform
NSColorPanelMBS.attachColorList(list as NSColorListMBS)
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.
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 |
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.
NSColorPanelMBS.Constructor
Function:
The constructor to create a new color panel.
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 |
NSColorPanelMBS.detachColorList(list as NSColorListMBS)
Function:
Detaches the color list from the panel.
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 |
NSColorPanelMBS.GetColor(byref red as single, byref green as single, byref blue as single, byref alpha as single) as boolean
Function:
The current color in the RGB color model.
Notes:
Values from 0.0 to 1.0.
Returns true if the values are valid.
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 |
Notes:
Values from 0.0 to 1.0.
Returns true if the values are valid.
See also:
NSColorPanelMBS.SetColor(red as single, green as single, blue as single, alpha as single)
Function:
Sets the color.
Notes: Values from 0.0 to 1.0.
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 |
Notes: Values from 0.0 to 1.0.
See also:
NSColorPanelMBS.setColor(value as NSColorMBS)
Function:
Sets the color.
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 |
See also:
NSColorPanelMBS.setContinuous(value as boolean)
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.
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 |
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.
NSColorPanelMBS.setMode(value as Integer)
Function:
Sets the mode of the panel the mode is one of the modes allowed by the color mask.
Notes:
Constants:
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 |
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 |
NSColorPanelMBS.SetPickerMode(value as Integer)
Function:
Specifies the color panel's initial picker.
Notes:
Constants:
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 |
Notes:
Constants:
NSColorPanelGrayModeMask | = &h00000001 |
NSColorPanelRGBModeMask | = &h00000002 |
NSColorPanelCMYKModeMask | = &h00000004 |
NSColorPanelHSBModeMask | = &h00000008 |
NSColorPanelCustomPaletteModeMask | = &h00000010 |
NSColorPanelColorListModeMask | = &h00000020 |
NSColorPanelWheelModeMask | = &h00000040 |
NSColorPanelCrayonModeMask | = &h00000080 |
NSColorPanelAllModesMask | = &h0000ffff |
NSColorPanelMBS.setShowsAlpha(value as boolean)
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.
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 |
Notes: Note that calling the NSColor method setIgnoresAlpha with a value of true overrides any value set with this method.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
Links
MBS Xojo Chart Plugins