ColorDialog

Pops up a dialog box for the user to select a color.

Constructors

this
this(Window parent, string title)

Construct the dialog.

this
this(string title)

Construct the dialog.

Members

Functions

setInitialColor
auto setInitialColor(string color)

Set the initial color to display in the dialog. Use colors from the preset color list or a web style hex color.

show
auto show()

Show the dialog.

Inherited Members

From Dialog

_parent
Window _parent;
Undocumented in source.
_title
string _title;
Undocumented in source.
_results
string[] _results;
Undocumented in source.
getResult
string getResult()

Get the dialog result. This varies on the type of dialog used and will reflect the overall result expected of each dialog.

removeBracesFromResults
void removeBracesFromResults()

Remove any leading or trailing braces.

show
auto show()

Show the dialog.

Examples

auto dialog = new ColorDialog("Select a color")
.setInitialColor(Color.white)
.show();

string color = dialog.getResult();

Result: The web style hex color selected.

See Also

Meta