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.
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.
  • 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

dBorderDraws the borders.
dRectangleDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dRoundedRectangleDraws a rounded rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
dRectangleGradientDraws a rectangle:
  • in an Image control,
  • in an Image variable,
  • in a WDPic variable (on the background layer),
  • in a picLayer variable.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment