User Tools

Site Tools


DzColorDialog

Script wrapper for QColorDialog.

More...

Inherits :

Methods

Detailed Description

A global static object available via the Global::ColorDialog variable.

This object provides functions to display an OS native color picker to the user - simply call the function as shown in the following example:

Example - Have the user select a color :

var clrUser = ColorDialog.getColor();

Other functions are provided for getting and setting the pre-set colors listed in the picker - see the rest of the documentation for details.

Methods


Color : customColor( Number i )

Return Value:

  • The i'th custom color in the color picker.

Number : customCount()

Return Value:

  • The number of custom colors in the color picker.

Color : getColor( Color initial=Color )

Shows a color picker dialog to the user.

Parameter(s):

  • initial - The color that the dialog will start with.

Return Value:

  • The color selected by the user.

void : setCustomColor( Number i, Color c )

Set the i'th custom color in the color picker.


void : setStandardColor( Number i, Color c )

Set the i'th standard color in the color picker.