PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Background color of an Edit control
  • Background color of a List Box or Combo Box control
  • Background color of the window
  • 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 Table control or a cell, column or row in a Table control
  • Limitations
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
Warning
From version 24, BrushColor is kept for backward compatibility. This property is replaced by BackgroundColor.
The BackgroundColor property is used to get and change the background color of:
  • a control.
  • a window.
  • a page.
  • a report block.
  • Versions 16 and later
    text in a menu option.
    New in version 16
    text in a menu option.
    text in a menu option.
Remark: The effects of the BackgroundColor property depend on the type of control (for more details, see "Remarks").
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
New in version 18
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
iPhone/iPad This property is now available for report controls or blocks in iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
Versions 20 and later
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for Table controls and table columns in Android and iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Apple Watch This property is now available in Apple Watch mode.
Example
// The background color is modified according to the displayed value
IF EDT_Total > 15000 THEN
EDT_Total.BackgroundColor = LightRed
END
Syntax

Determining 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:
<Element used>: Type of element
Name of the element to be used: 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 the element to be used: 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
Universal Windows 10 AppAndroidiPhone/iPadMac Catalyst

Background color of an Edit control

The BackgroundColor property is used to get and change the background color of the text entered in a control.
Background color of an Edit control
Universal Windows 10 AppAndroidiPhone/iPadMac Catalyst

Background color of a List Box or Combo Box control

The BackgroundColor property is used to find out and modify the background color of:
  • All the options of the control.
  • A single option.
Universal Windows 10 AppAndroidiPhone/iPadMac Catalyst To find out or modify the background color of an option found in the List Box control, use the following syntax to identify the element of the List Box control:
NameListBoxControl[RowNum]

For example, the following code is used to modify the background color of the second row in the List Box control:
LIST_List1[2].BackgroundColor = LightGreen

Caution: In List Box controls, the new color is kept for the visible rows only.
Background color of a List Box control
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst

Background color of the window

If the window is not a "MDI parent" window, the BackgroundColor property allows you to get and change the background color of the window's client area.
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac Catalyst

Background color of a Static control

The BackgroundColor property is used to get and change the background color of the text in a Static control.
Background color of a Static control
Universal Windows 10 AppAndroidAndroid Widget iPhone/iPadMac Catalyst

Background color of a Button control

The BackgroundColor property is used to change the background color of a Button control.
Universal Windows 10 AppAndroidiPhone/iPadMac Catalyst

Background color in a Radio Button or Check Box control

The BackgroundColor property is used to get and change the background color of a Radio Button or Check Box control.
Background color of a Radio Button control
AndroidiPhone/iPadMac Catalyst

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

Used on the entire Table control, the BackgroundColor property 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, simply use the BackgroundColor property in the "Selecting a row" process.

Limitations

Universal Windows 10 AppiPhone/iPadIOS WidgetMac Catalyst Limitations on report controls
The BackgroundColor property has no effect on:
  • reports (as a whole).
  • Internal Report controls.
  • Versions 21 and later
    Signature controls.
    New in version 21
    Signature controls.
    Signature controls.
Android Widget The BackgroundColor property applies only to the following elements:
  • Button control.
  • Static control.
  • Image control.
  • Window.
IOS Widget The BackgroundColor property applies only to the following elements:
  • Static control.
  • Image control.
  • Window.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment