PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Gradient parameters
  • Background color
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
gBackgroundGradient (Function)
In French: gFondDégradé
Describes a display color in gradient mode. This color can be used for the background of the text displayed in an element of a List Box or Combo Box control, for a table cell, ...
Caution: This function cannot be directly used for the background of a window (see the example below).
Example
// Add the "Yellow" word on a gradient background (from red to green) into "LIST_ColorList"
ListAdd(LIST_ColorList, gBackgroundGradient(LightRed, LightGreen) + "Yellow")
// Example used to apply a gradient window background.
// Use an off-screen image control whose size is identical to the window size (IMG_Gradient)

MyImage is string
MyImage = CompleteDir(fExeDir()) + "BckgrdImage.JPG"
IF fFileExist(MyImage) = True THEN fDelete(MyImage)
IMG_Gradient = gBackgroundGradient(PastelRed, PastelBlue, 70)
dSaveImageJPEG(IMG_Gradient, MyImage, 65)
WIN_Window1..BackgroundImage = MyImage
Syntax
<Result> = gBackgroundGradient(<Start Color> , <End Color> [, <Angle> [, <Color 3> [, <Distance Color 3> [, <Color 4> [, <Distance Color 4>]]]]])
<Result>: Character string
Control string to be used:
<Start Color>: Integer or constant
Start color of gradient. This color corresponds to:
<End Color>: Integer or constant
End color of gradient. This color corresponds to:
<Angle>: Optional integer
Angle that will be used for the selection of colors in the gradient. The angle value is included between 0 (horizontal angle, default value) and 360°.
<Color 3>: Optional constant or integer
Color that will be used in the gradient. This color corresponds to:
<Distance Color 3>: Optional integer
Percentage separating the start color from color 3.
<Color 4>: Optional constant or integer
Color that will be used in the gradient. This color corresponds to:
<Distance Color 4>: Optional integer
Percentage separating the start color from color 4.
Remarks

Gradient parameters

The color parameters are used as follows:
The angle is used to define the orientation of the gradient.
The gradients performed with 3 or 4 colors are only available for an angle set to 0 or 90 degrees.
Note: The gradient colors are not available for some systems (Windows 98 or Me for example) or for TSE 256 colors. In this case, a rectangle whose color corresponds to <Start Color> is displayed.

Background color

  • gBackgroundGradient can be used to define the background of a graphic area in the title bar and status bar of a window or in a Static control.
  • gBackgroundGradient called with the Transparent constant is used to superimpose a text and a graphic.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment