PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Background color of an Edit control
  • Background color of a List Box or Combo Box control
  • Background color of a Static control
  • Background color of a Button control
  • Background color in a Radio Button or Check Box control
  • Background color of a TreeView control
  • Background color of a Table control or a cell, column or row in a Table control
  • Background color of a cell
  • Limits
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
Warning
From version 24, BrushColor is kept for backward compatibility. This property is replaced by BackgroundColor.
..BackgroundColor is used to find out and modify the background color of:
  • a control.
  • a window.
  • a page.
  • a report block.
  • Versions 16 and later
    a caption of a menu option.
    New in version 16
    a caption of a menu option.
    a caption of a menu option.
Remark: The effects of ..BackgroundColor depend on the type of control (see "Remarks" for more details).
Versions 19 and later
WEBDEV - Browser code This function is now available in browser code for Table controls in browser mode.
New in version 19
WEBDEV - Browser code This function is now available in browser code for Table controls in browser mode.
WEBDEV - Browser code This function is now available in browser code for Table controls in browser mode.
Example
// The background color is modified according to the displayed value
IF EDT_Total > 15000 THEN
EDT_Total..BackgroundColor = LightRed
END
Syntax

Finding out the background color Hide the details

<Background color> = <Element used>..BackgroundColor
<Background color>: Integer or constant
Color of specified element. Corresponds to one of the following options:
WEBDEV - Browser code The color is returned in the format of a character string by the browser.
<Element used>: Type of element
Name of element to use: control, window, page or report block.

Modifying the background color Hide the details

<Element used>..BackgroundColor = <New color>
<Element used>: Type of element
Name of element to use: control, window, page or report block.
<New color>: Integer or constant
New color for the specified element. Corresponds to one of the following options:
Remarks
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color of an Edit control

..BackgroundColor is used to find out and modify the background color of the text typed.
Background color of an Edit control
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color of a List Box or Combo Box control

..BackgroundColor is used to find out and modify the background color of:
  • All the options of the control.
  • A single option.
    WEBDEV - Server codeWEBDEV - Browser codePHPAjax This feature is not available in WEBDEV.
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color of a Static control

..BackgroundColor is used to find out and modify the background color of the text displayed a Static control.
Background color of a Static control
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color of a Button control

..BackgroundColor is used to modify the background color of a Button control.
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color in a Radio Button or Check Box control

..BackgroundColor is used to find out and modify the background color of a Radio Button or Check Box control.
Background color of a Radio Button control
WEBDEV - Server codePHPAjax

Background color of a TreeView control

..BackgroundColor is used to find out and modify the background color of:
  • All the options of the TreeView control.
  • A single option.
To find out or modify the background color of an option in the TreeView control, use the following syntax to identify the element in the TreeView control:
TreeViewName[RowNum]
Example: the following code is used to modify the background color of the second row:
TREE_Treeview1[2]..BackgroundColor = LightGreen
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Background color of a Table control or a cell, column or row in a Table control

Used on the entire Table control, ..BackgroundColor allows you to:
  • Delete the colors specific to the cells and columns via the following syntax:
    <Name of Table control>..BackgroundColor = DefaultColor
  • Modify the background color of all columns in the Table control (especially the uncolored columns and cells). For example, the following code is used color all the columns in blue:
    <Name of Table control>..BackgroundColor = DarkBlue
This property is also used to find out and modify the background color of a cell in a Table control. The following syntax must be used to identify the cell:
NameTableControl[RowNum][ColumnNum]
Example: The following code is used to modify the background color of the cell found in first row, second column.
TABLE_Table1[1][2]..BackgroundColor = DarkBlue
Background color of a Table control cell
Caution: To keep the background color when selecting a row in a browsing Table control, ..BackgroundColor must be used in the process named "Selecting a table row".
Versions 19 and later
WEBDEV - Browser code ..BackgroundColor is available in browser code only for browser Table controls on:
  • Rows of the Table control (browser).
  • Columns of the Table control (browser).
  • Cells of the Table control (browser).
This property is not available in browser code for classic or Ajax Table controls.
New in version 19
WEBDEV - Browser code ..BackgroundColor is available in browser code only for browser Table controls on:
  • Rows of the Table control (browser).
  • Columns of the Table control (browser).
  • Cells of the Table control (browser).
This property is not available in browser code for classic or Ajax Table controls.
WEBDEV - Browser code ..BackgroundColor is available in browser code only for browser Table controls on:
  • Rows of the Table control (browser).
  • Columns of the Table control (browser).
  • Cells of the Table control (browser).
This property is not available in browser code for classic or Ajax Table controls.
WEBDEV - Browser code

Background color of a cell

..BackgroundColor is used to find out and modify the background color of the cells found in the WEBDEV pages.

Limits

WEBDEV - Server code Limitations on report controls
..BackgroundColor has no effect on:
  • the reports (as a whole).
  • the Internal Report controls.
  • Versions 21 and later
    Signature controls.
    New in version 21
    Signature controls.
    Signature controls.
WEBDEV - Server code Limits for the page controls
..BackgroundColor has no effect on the elements found in a List Box or Combo Box control.
WEBDEV - Browser code In browser code, ..BackgroundColor operates on the following controls:
  • the edit controls,
  • the List Box controls and the elements of a List Box control,
  • the Combo Box controls and the elements of a Combo Box control,
  • the rows of aTable control,
  • Static and HTML Static controls.
  • 3-state Button controls.
  • the Check Box and Radio Button controls.
  • Image controls, Clickable Image controls.
  • the "Formatted display" controls.
  • the Link controls.
  • HTML controls.
  • the cells.
  • the Thumbnail controls.
  • the iFrame controls.
  • Versions 19 and later
    the rows of the browser Table control.
    New in version 19
    the rows of the browser Table control.
    the rows of the browser Table control.
  • Versions 19 and later
    the columns of the browser Table control.
    New in version 19
    the columns of the browser Table control.
    the columns of the browser Table control.
  • Versions 19 and later
    the cells of the browser Table control.
    New in version 19
    the cells of the browser Table control.
    the cells of the browser Table control.
..BackgroundColor also operates on the pages.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment