ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Various properties
  • Font variable
  • Color of an Edit control
  • Text color in a Static Text control
  • Text color of a Button control
  • Text color of a Radio Button or Check Box control
  • Text color of a List Box or Combo Box control
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The Color property gets or sets the font color of:
  • a variable of type Font.
  • text displayed in a Static or Calculated control of a report.
  • text displayed in a window control.
  • text displayed in a page control.
  • text in a menu option.
The effects of the Color property depend on the type of control (for more details, see "Remarks").
Note: By default, the color of a Font variable is black.
Example
// The text color is modified according to the displayed value
IF EDT_Total>15000 THEN
EDT_Total.Color = LightRed
END
Reports and Queries
// Définir les caractéristiques d'une variable de type Police
Police1 is Font
Police1.Name = "Arial"
Police1.Color = LightYellow
Police1.Size = 14
Police1.SizeUnit = unitPoint
Police1.Orientation = 45
// Appliquer la police au champ "MonChamp"
MyControl.Police = Police1
Syntax

Getting the text color Hide the details

<Result> = <Element used>.Color
<Result>: Integer or constant
Color of the specified element. This color can correspond to:
<Element used>: Control name or Font variable
Name of the element for which you want to get the text color. This element can correspond to:
  • name of a control in a window or page.
  • name of a control in a report.
  • name of a variable of type Font.

Changing the text color Hide the details

<Element used>.Color = <New color>
<Element used>: Control name or Font variable
Name of the element for which you want to change the text color. This element can correspond to:
  • name of a control in a window or page.
  • name of a control in a report.
  • name of a variable of type Font.
<New color>: Integer or constant
New color of the specified element. This color can correspond to:
Remarks

Font variable

A font can be created from a Font variable.
To define the font characteristics, use:
This font can be used:
Assigning a font to a control:
  • if the Font variable has no specific color, the color of the text displayed in the control is kept.
  • if the Font variable has a specific color, this color is applied to the text displayed in the control.

Color of an Edit control

The Color property can be used to identify and modify the color of text entered.
Reports and Queries

Text color in a Static Text control

The Color property lets you identify and modify the text color of a Static Text control.
Reports and Queries

Text color of a Button control

The Color property lets you identify and modify the color of the text in a Button field.
Reports and Queries

Text color of a Radio Button or Check Box control

The Color property can be used to identify and modify the text color of all Radio Button control and Check Box control options.
Reports and Queries

Text color of a List Box or Combo Box control

The Color property gets and sets the text color of all the options of a List Box control.

Limitations

Reports and Queries Limitations on report controls
The Color property has no effect on:
  • Image controls.
  • Bar Code controls.
  • RTF controls.
  • Check Box controls.
  • Chart controls.
  • Signature controls.
  • reports.
  • report blocks.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/06/2025

Send a report | Local help