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.
color picker under Windows:
Windows color picker
In this window:
  • To change the shade, simply use the circle.
  • Use the square to change saturation and brightness.
WEBDEV - Browser code
Color picker
Color picker in the browser
Java Note: The picker corresponds to the color picker supplied with the JRE.
Example
Reports and QueriesWindowsJavaUser code (UMC)
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)
WEBDEV - Browser code
// == Code de clic d'un bouton navigateur
// Sélection de la couleur en code Navigateur
SelectColor(RGB(42,56,99), SelectCouleur_Callback)
INTERNAL PROCEDURE SelectCouleur_Callback(coCouleur is Color)
	CELL_SansNom1.CouleurFond = coCouleur
END
WEBDEV - Browser code
// Bouton navigateur permettant de sauver la couleur qui pourra ensuite être utilisée par le serveur
// Code de clic du bouton navigateur
SelectColor(RGB(42,56,99), SelectCouleur_Callback)
	INTERNAL PROCEDURE SelectCouleur_Callback(coCouleur is Color)
	// Ajoute la couleur dans la base de données 
	// et synchronise la variable navigateur avec l'information
	AJAXExecute(ajaxSynchronizeServerVariables + ajaxUpdateControls, AjouteCouleurSrv, coCouleur)
	END

// Procédure Ajax
PROCEDURE AjouteCouleurSrv(coCouleurASauver)
CELL_SansNom2.CouleurFond = coCouleurASauver
Syntax
Reports and QueriesWindowsJavaUser code (UMC)

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.
Java This parameter is ignored.
<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.
Java This parameter is ignored.
WEBDEV - Browser code

Selecting a color in browser code Hide the details

SelectColor(<Initial value> , <WLanguage procedure>)
<Initial value>: Integer
Initial color selected in the window for color selection. This color can correspond to:
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") executed when the color selection popup is closed. For more details on this procedure, see Parameters of the procedure used by SelectColor.
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: 09/19/2024

Send a report | Local help