PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Properties specific to the description of Background variables
  • Functions that use Background variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Background type defines the advanced characteristics of the element background. The characteristics of this background can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Versions 25 and later
WEBDEV - Browser code This type of variable is now available in browser code.
New in version 25
WEBDEV - Browser code This type of variable is now available in browser code.
WEBDEV - Browser code This type of variable is now available in browser code.
Versions 27 and later
Android This type of variable is now available for Android applications.
New in version 27
Android This type of variable is now available for Android applications.
Android This type of variable is now available for Android applications.
Example
// Draw a rectangle with blue borders, green background and rounded corners
// in an Image control
 
// Initializes the drawing in the Image control
dStartDrawing(IMG_Drawing)
 
Rect is Rectangle
Rect.X = 10
Rect.Y = 15
Rect.Width = 100
Rect.Height = 150
BorderStyle is Border
BorderStyle.Color = LightBlue
BorderStyle.Round = 30
BorderStyle.Thickness = 1
BackgroundStyle is Background
BackgroundStyle.Color = LightGreen
dBorder(Rect, BorderStyle, BackgroundStyle)
Remarks

Properties specific to the description of Background variables

The following properties can be used to handle the background of an element:
Property nameType usedEffect
ColorColor variableBackground color.
GradientGradient of the background color:
  • ColorStart property (Color type): Start color of the gradient.
  • ColorEnd property (Color type): End color of the gradient.
  • Angle property (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°.
  • Color3 property (Color type): Color that will be used in the gradient.
  • DistanceColor3 property (integer): Percentage separating the start color from color 3.
  • Color4 property (Color type): Color that will be used in the gradient.
  • DistanceColor4 property (integer): Percentage separating the start color from color 4.
The color parameters are used as follows:
The angle is used to define the orientation of the gradient.
Gradients with 3 or 4 colors are only available for 0 or 90 degree angles.
Remarks:
  • On some systems (e.g., 256-color Remote Desktop Connection), gradients are not available. In this case, the color defined via the ColorStart property is used.
  • Versions 22 and later
    Gradient backgrounds are not supported in docx documents.
    New in version 22
    Gradient backgrounds are not supported in docx documents.
    Gradient backgrounds are not supported in docx documents.
HatchInteger constantType of hatching used:
  • HatchNone: No hatching.
  • HatchCrossed: Criss-crossed hatching.
  • HatchCrossedDiagonal: Diagonal crossed hatching.
  • HatchDiagonal: Diagonal hatching at 60%.
  • HatchDiagonalBottom: Diagonal hatching at 120%.
  • HatchHorizontal: Horizontal hatching.
  • HatchVertical: Vertical hatching.
TypeInteger constantType of background:
  • BackgroundSolid: Solid background.
  • BackgroundTransparent: Transparent background (the Color property is ignored).
  • BackgroundHatched: Hatched background (the Hatch property is taken into account).
  • BackgroundGradient: Background with color gradient (the Gradient property is taken into account).

Functions that use Background variables

Versions 21 and later
dBorder
New in version 21
dBorder
dBorder
Draws the borders.
Versions 09 and later
dRectangle
New in version 09
dRectangle
dRectangle
Draws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
Versions 21 and later
dRoundedRectangle
New in version 21
dRoundedRectangle
dRoundedRectangle
Draws a rounded rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
Versions 12 and later
dRectangleGradient
New in version 12
dRectangleGradient
dRectangleGradient
Draws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
Android The syntaxes of dRectangle, dRoundedRectangle and dRectangleGradient that use Border or Background variables are not available in Android. You must use dBorder.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment