_COLORCHOOSERDIALOG
Jump to navigation
Jump to search
The _COLORCHOOSERDIALOG function displays a standard color picker dialog box. It returns a 32-bit RGBA color with the alpha channel set to &HFF (255). A zero is returned if the user cancelled.
Syntax
- color32bpp~& = _COLORCHOOSERDIALOG([title$][, defaultRGB~&])
Parameters
- title$ is the dialog box title
- defaultRGB~& is the default 32-bit RGB color that is pre-selected
Description
- title$ accepts an empty string ("") in which case system defaults are used
- The dialog box automatically becomes a modal window if the application window is visible
- defaultRGB~& may be ignored on some platforms
Availability
- QB64-PE v3.4.0 and up
Examples
- Example
- Color selection
mycolor~& = _COLORCHOOSERDIALOG("Select a color", _RGB32(0, 255, 255)) IF mycolor~& <> 0 THEN _MESSAGEBOX "Information", "You selected " + HEX$(mycolor~&) |
See also
- _NOTIFYPOPUP
- _MESSAGEBOX
- _MESSAGEBOX (function)
- _INPUTBOX$
- _SELECTFOLDERDIALOG$
- _OPENFILEDIALOG$
- _SAVEFILEDIALOG$