DialogsShowColorDialog Method (Object, Color4f, Boolean, NamedColorList, DialogsOnColorChangedEvent) |
Displays the standard modal color picker dialog for floating point colors.
Namespace:
Rhino.UI
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntaxpublic static bool ShowColorDialog(
Object parent,
ref Color4f color,
bool allowAlpha,
NamedColorList namedColorList,
DialogsOnColorChangedEvent colorCallback
)
Public Shared Function ShowColorDialog (
parent As Object,
ByRef color As Color4f,
allowAlpha As Boolean,
namedColorList As NamedColorList,
colorCallback As DialogsOnColorChangedEvent
) As Boolean
Parameters
- parent
- Type: SystemObject
Parent window for this dialog, should always pass this if calling from a form or user control. - color
- Type: Rhino.DisplayColor4f
The initial color to set the picker to and also accepts the user's choice. - allowAlpha
- Type: SystemBoolean
Specifies if the color picker should allow changes to the alpha channel or not. - namedColorList
- Type: Rhino.UINamedColorList
If not null and contains at least one named color this list will replace the standard Rhino Color list displayed by
the rhino color dialog.
- colorCallback
- Type: Rhino.UIDialogsOnColorChangedEvent
May be optionally passed to ShowColorDialog and will get called when
the color value changes in the color dialog.
Return Value
Type:
Booleantrue if a color was picked, false if the user canceled the picker dialog.
See Also