Constructors
GH_ColourPickerBase
#Create a new instance of the Colour Picker base control. This constructor assigns the default Colour space model and involves a call to the Grasshopper core settings server. You must call SetupColourPicker() prior to rendering this control on screen.
public GH_ColourPickerBase()
Properties
AutoSize
#Gets or sets a value indicating whether the width and height of the Bounds are adjusted to fit the UI.
BaseColour
#Gets the original base colour for this picker. Use SetupColourPicker to assign this colour.
DrawAlphaSlider
#Gets or sets whether or not the alpha slider is included in the UI.
DrawBackground
#Gets or sets whether the background of the picker is drawn.
DrawChannelSliders
#Gets or sets whether or not the three basic channel sliders are included in the UI.
DropperPreviewBox
#Gets the rectangle in which the eye-dropped preview will be drawn.
public Rectangle DropperPreviewBox { get; }
Font
#Gets or sets the Font used in this Colour Picker. Do not Dispose the Font returned by this property.
public Font Font { get; set; }
Padding
#Gets or sets the Padding for this control.
SRCSpaceBox
#Gets the rectangle containing the eye-dropper function.
public Rectangle SRCSpaceBox { get; }
Methods
MouseClick
#Respond to mouse-click events.
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
MouseDoubleClick
#Respond to mouse-doubleclick events.
public bool MouseDoubleClick()
args,
Mouse Event arguments.
PointF
pt,
Mouse cursor position in floating point accuracy.
Control
owner,
Owner control for this colour-picker.
Matrix
transform
Display Transformation matrix of colour-picker.
MouseDown
#Respond to mouse-down events.
Returns: True if a Drag operation was started, false if the event went unnoticed.
MouseMove
#Respond to mouse-move events.
Returns: True if a Drag operation was performed, false if the event went unnoticed.
MouseUp
#Respond to mouse-up events.
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
SetupColourPicker
#Setup all UI elements.
public void SetupColourPicker()
Color
col0,
Initial colour for this picker.
Color
col1,
Active colour for this picker.
space
Colour space mode for this picker.
SetupColourPicker
#Setup all UI elements.
public void SetupColourPicker()
Color
col0,
Initial colour for this picker.
col1,
Active colour for this picker.
space
Colour space mode for this picker.