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

NSColorPanelMBS class

Super class: NSPanelMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa Drawing MBS MacCocoa Plugin 7.2 Yes No No Yes, macOS only No
Function: A class to control a Color Panel (floating window).
Notes:
If you use SelectColor in your application, this color panel will be converted in a dialog which makes this class useless.

You should only have one instance of this class in your application.

If you compile for Cocoa, a TextField/TextArea automatically registers for color panel. So in order to avoid them updating text color with color panel selection, clear the focus by calling window.clearfocus method.

This class does only work on desktop computers, not in a webbrowser.
Subclass of the NSPanelMBS class.

Feedback, Comments & Corrections

Modes

Constant Value Description
NSCMYKModeColorPanel 2 Cyan-yellow-magenta-black
NSColorListModeColorPanel 5 Custom color list
NSCrayonModeColorPanel 7 Crayons.
NSCustomPaletteModeColorPanel 4 Custom palette
NSGrayModeColorPanel 0 Grayscale-alpha
NSHSBModeColorPanel 3 Hue-saturation-brightness
NSNoModeColorPanel -1 Indicates no color panel mode.
Available in OS X version 10.5 and later.
NSRGBModeColorPanel 1 Red-green-blue
NSWheelModeColorPanel 6 Color wheel

Masks

Constant Value Description
NSColorPanelAllModesMask &h0000ffff All of the above.
NSColorPanelCMYKModeMask &h00000004 Cyan-yellow-magenta-black.
NSColorPanelColorListModeMask &h00000020 Custom color list.
NSColorPanelCrayonModeMask &h00000080 Crayons.
NSColorPanelCustomPaletteModeMask &h00000010 Custom palette.
NSColorPanelGrayModeMask &h00000001 Grayscale-alpha.
NSColorPanelHSBModeMask &h00000008 Hue-saturation-brightness.
NSColorPanelRGBModeMask &h00000002 Red-green-blue.
NSColorPanelWheelModeMask &h00000040 Color wheel.

Super class NSPanelMBS

Super class NSWindowMBS

Super class NSResponderMBS

This class has no sub classes.

Some examples which use this class:


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


NSColorMBS   -   NSColorPickerTouchBarItemMBS




Links
MBS FileMaker Plugins