Previous - dlgMessageBox Section Home - System Standard Dialogs Next - dlgFile


dlgColorBox ( )

Displays a standard windows modal color picker dialog box.

Usage:

dlgColorBox (object me, object customColorList )

Parameters:

customColorList (string) - A list containing up to 16 customized rgbColors to display in the dialog box. The first rgb value in the list will automatically become the color selected. If the list contains less than 16 rgb values, the operating system may fill the remaining custom colors white or use its own color list.

Returns:

(property list) A property list with 2 properties: #selected and #custom. The #selected property contains an rgb value for the end user's selection. If the user cancels, then the property value is EMPTY. The #custom property contains a list of 16 rgb values. Some possible examples are:

// end user selected some colors
[#Selected: rgb( 22, 105, 70 ), #custom: [rgb( 0, 255, 255 ), rgb( 255, 0, 0 ), rgb( 0, 0, 255 ), rgb( 70, 17, 0 ), rgb( 128, 250, 181 ), rgb( 6, 204, 6 ), rgb( 112, 250, 181 ), rgb( 16, 0, 0 ), rgb( 240, 165, 23 ), rgb( 160, 250, 181 ), rgb( 16, 0, 0 ), rgb( 16, 0, 0 ), rgb( 115, 14, 1 ), rgb( 160, 250, 181 ), rgb( 0, 0, 0 ), rgb( 16, 0, 0 )]]

// end user canceled on the dialog box
[#Selected: "", #custom: [rgb( 0, 255, 255 ), rgb( 255, 0, 0 ), rgb( 0, 0, 255 ), rgb( 212, 117, 35 ), rgb( 255, 255, 255 ), rgb( 92, 246, 18 ), rgb( 68, 116, 35 ), rgb( 232, 204, 6 ), rgb( 12, 117, 35 ), rgb( 220, 74, 193 ), rgb( 16, 0, 0 ), rgb( 16, 0, 0 ), rgb( 115, 14, 1 ), rgb( 220, 74, 193 ), rgb( 0, 0, 0 ), rgb( 16, 0, 0 )]]

Example:

xtRose = xtra("Rosetta").new( )
put xtRose.dlgColorBox( [ rgb( 0, 255, 255 ), rgb( 255, 0, 0 ), rgb( 0, 0, 255 ) ] )

Notes:


Previous - dlgMessageBox Section Home - System Standard Dialogs Next - dlgFile