ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
SelectColor (Function)
In french: SelectCouleur
Opens the window for color selection while selecting the specified color.
Windows color picker:
Windows color picker
In this window:
  • To change the shade, simply use the circle.
  • Use the square to change saturation and brightness.
Example
Reports and QueriesWindows
Valeur is int 
RésultatSélection is boolean
Valeur = RGB(10, 17, 69)
Info("Couleur de départ : " + Valeur)
RésultatSélection = SelectColor(Valeur, scInit)
Info("Couleur d'arrivée : " + Valeur)
Syntax
Reports and QueriesWindows

Selecting a color on Windows Hide the details

<Result> = SelectColor(<Initial value> [, <Options> [, <Custom colors>]])
<Result>: Boolean
Exit mode from the window for color selection:
  • True if the OK button was clicked by the user,
  • False otherwise (Cancel button).
<Initial value>: Integer
Initial color selected in the window for color selection. This color can correspond to:
When the color selection window is closed, <Initial value> contains the value of the selected color if the user validated the window using the OK button.
<Options>: Optional constant or optional combination of constants
Options for displaying the window for color selection
scAnyColorAll the colors are allowed.
Window displayed: Color selection window.
scHelpEnables the help button.
Window displayed: Standard Windows color selection window.
scInit
(Default value)
The default color selected in the color selection window is the color passed as parameter to SelectColor.
Window displayed: Color selection window.
scNotPersoColorThe custom color creation button is dimmed.
Window displayed: Standard Windows color selection window.
scPersoColor
  • If <Custom colors> is specified, the Windows standard color selection window is displayed and the button for creating custom colors is enabled.
  • If <Custom colors> is not specified, the color selection window is displayed.
scSolidColorOnly non-hatched colors are allowed.
Window displayed: Color selection window.
scSystemDisplays the standard window for color selection of Windows.

Note: When combining constants, the new color selection window is only displayed if all the requested functions are available in this window.
<Custom colors>: Optional address
Address of an array of 16 integers containing the RGB codes of the custom colors. If this parameter is not specified, 16 shades of gray are proposed.
Business / UI classification: UI Code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help