PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE


WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SelectColor (Function)
In French: SelectCouleur
Opens the window for color selection while selecting the specified color.
Versions 15 and later
Java This function is now available for the Java applications.
New in version 15
Java This function is now available for the Java applications.
Java This function is now available for the Java applications.
Until version 17, the standard window for color selection of Windows is opened:
Standard color picker of Windows
From version 18, a more modern window for color selection is displayed (according to the selected options).
Java Note: The picker corresponds to the color picker supplied with the JRE.
Example
Value is int
SelectionResult is boolean

Value =  RGB(10, 17, 69)
Info("Initial color: " + Value)
SelectionResult = SelectColor(Value, scInit)
Info("Final color: " + Value)
Syntax
<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.
Caution: You must not use a color constant directly (LightRed, etc.) or RGB. You have the ability to use a variable equal to:
Not to do:
SelectionResult is boolean = SelectColor(RGB(10, 17, 69), scInit)
Do:
Value is int = RGB(10, 17, 69)
SelectionResult is boolean = SelectColor(Value, scInit)
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
scHelpEnables the help button.
Window displayed: Standard window for color selection of Windows.
scPersoColorEnables the button for creating custom colors.
Window displayed: Standard window for color selection of Windows.
  • If <Custom Colors> is specified, the standard window for color selection of Windows is displayed and the button for creating custom colors is enabled.
  • If <Custom Colors> is not specified, the window for color selection is displayed.
scSolidColorOnly non-hatched colors are allowed.
Window displayed: Window for color selection.
scInit
(Default value)
The color selected by default in the window for color selection corresponds to the color passed in parameter to SelectColor.
Window displayed: Window for color selection.
scNotPersoColorThe custom color creation button is dimmed.
Window displayed: Standard window for color selection of Windows.
Versions 18 and later
scSystem
New in version 18
scSystem
scSystem
Displays the standard window for color selection of Windows.
scAnyColorAll the colors are allowed.
Window displayed: Window for color selection.
Versions 18 and later
Note: When combining constants, the new window for color selection is displayed only if all the requested features are available in this window.
New in version 18
Note: When combining constants, the new window for color selection is displayed only if all the requested features are available in this window.
Note: When combining constants, the new window for color selection is displayed only if all the requested features 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.
Components
WINDEVReports and Queries wd230std.dll
Java wd230java.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Example Select Color
//BTN_SelectColor to Edt_Color

nMyColorIntClick is int = 0

SelectColor(nMyColorIntClick, scInit)

//info(nMyColorIntClick)

sMyColorHexa is string = IntToHexa(nMyColorIntClick)

//info(sMyColorHexa)

EDT_BgColorTable = "#"+sMyColorHexa
BOLLER
Jul. 08 2018
Warning for use
For the correct use of this function, use an int Variable, variables of type 8 Bytes int do not work properly.

nMyColor is int = RGB (10,20,50)
SelectColor(nMyColor, scInit)

mySelf..Brushcolor = nMyColor

Attempt use correct sintaxe.
Not use nMyColor is int = SelectColor()

SelectColor Returns True/False
rtarozo
Oct. 13 2017