Constructors
GH_ColourPickerBase
#public 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.
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
#public Rectangle DropperPreviewBox { get; }
Gets the rectangle in which the eye-dropped preview will be drawn.
Font
#public Font Font { get; set; }
Gets or sets the Font used in this Colour Picker. Do not Dispose the Font returned by this property.
Padding
#Gets or sets the Padding for this control.
SRCSpaceBox
#public Rectangle SRCSpaceBox { get; }
Gets the rectangle containing the eye-dropper function.
Methods
MouseClick
#Respond to mouse-click events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
MouseDoubleClick
#Respond to mouse-doubleclick events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
| owner (Control) | Owner control for this colour-picker. |
| transform (Matrix) | Display Transformation matrix of colour-picker. |
MouseDown
#Respond to mouse-down events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was started, false if the event went unnoticed.
MouseMove
#Respond to mouse-move events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was performed, false if the event went unnoticed.
MouseUp
#Respond to mouse-up events.
Parameters:
| args (MouseEventArgs) | Mouse Event arguments. |
| pt (PointF) | Mouse cursor position in floating point accuracy. |
Returns: True if a Drag operation was terminated, false if the event went unnoticed.
OnColorChanged
#Raise the ColorChanged event.
Parameters:
| intermediate (bool) | Set the intermediate state of the event arguments. |
SetupColourPicker
#Setup all UI elements.
Parameters:
| col0 (Color) | Initial colour for this picker. |
| col1 (Color) | Active colour for this picker. |
| space (GH_ColourSpace) | Colour space mode for this picker. |
SetupColourPicker
#Setup all UI elements.
Parameters:
| col0 (Color) | Initial colour for this picker. |
| col1 (Point4d) | Active colour for this picker. |
| space (GH_ColourSpace) | Colour space mode for this picker. |