PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Font variable
  • Color of an edit control
  • Color of text in a Static control
  • Color of the text in a button
  • Color of the text in a Radio Button or Check Box control
  • Color of the text in a List Box or Combo Box control
  • Color of a TreeView control
  • Color of the text displayed in a table cell, in a row or in a column
  • 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
..Color is used to find out and modify the font color for:
  • a Font variable.
  • a text displayed in a Static control or in a Calculated control of a report.
  • a text displayed in a window control.
  • a text displayed in a page control.
  • 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.
The effects of ..Color depend on the type of control (see "Remarks" for more details).
Remark: A Font variable is black by default.
WEBDEV - Server code The modification is available for "Automatic" or "Dynamic" controls only ("Details" tab of the control description).
WEBDEV - Server code The modification is available for "Automatic" or "Dynamic" controls only ("GUI" tab of the control description).
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 text color is modified according to the displayed value
IF EDT_Total>15000 THEN
EDT_Total..Color = LightRed
END
WEBDEV - Server codePHPAjax
// Define the characteristics of a Font variable
Font1 is Font
Font1..Name = "Arial"
Font1..Size = 14
Font1..Color = LightYellow
// Apply the font to "MyControl"
MyControl..Font = Font1
Syntax

Finding out the text color Hide the details

<Result> = <Element name>..Color
<Result>: Integer or constant
Color of specified element. This color can correspond to:
WEBDEV - Browser code The color is returned in the format of a character string by the browser.
<Element name>: Character string (with or without quotes)
Name of element for which the text color must be found. This element can correspond to:
  • the name of a control in a window or in a page.
  • the name of a report control.
  • the name of a Font variable.

Modifying the text color Hide the details

<Element name>..Color = <New color>
<Element name>: Character string (with or without quotes)
Name of element for which the text color must be modified. This element can correspond to:
  • the name of a control in a window or in a page.
  • the name of a report control.
  • the name of a Font variable.
<New color>: Integer or constant
New color for the specified element. This color can correspond to:
Remarks
WEBDEV - Server codePHPAjax

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

..Color is used to find out and modify the color of the text typed.
WEBDEV - Server codePHPAjax

Color of text in a Static control

..Color is used to find out and modify the color of the text found in a Static control.
WEBDEV - Server codePHPAjax

Color of the text in a button

..Color is used to find out and modify the color of the text found in a button.
WEBDEV - Server codePHPAjax

Color of the text in a Radio Button or Check Box control

..Color is used to find out and modify the color of the text for all the options found in a Radio Button or Check Box control.
WEBDEV - Browser codePHP

Color of the text in a List Box or Combo Box control

..Color is used to find out and modify the color of the text for all the options found in a list box.
WEBDEV - Server codePHPAjax

Color of a TreeView control

..Color is used to find out and modify the color of all the captions displayed in a TreeView control.
To find out or modify the color of the text displayed in a treeview option, use one of the following syntaxes to identify the treeview element:
  • TreeViewName[RowNum]
  • TreeViewName[<Element Path>] where Element Path is a character string in the following format:
    "<Name of root>" + TAB + ["<Name of 1st node>" + TAB +...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
Examples:
TREE_TreeView2[2]..Color = LightGreen // Colors the second row in green
TREE_MyTreeView["Recipe" + TAB + "Dessert"]..Color = LightRed
WEBDEV - Server codeWEBDEV - Browser codePHPAjax

Color of the text displayed in a table cell, in a row or in a column

  • To find out or modify the color of the text displayed in a table cell, use the following syntax to specify the cell: TableName[RowNum][ColumnNum].
    For example, the following code is used to modify the color of the text displayed in the cell on the first row, second column:
    TABLE_Table1[1][2]..Color = DarkBlue
  • To find out or modify the color of the text displayed in a table row, use the following syntax to identify the row: TableName[RowNum].
  • To find out and modify the color of the text found in a table column, all you have to do is use ..Color with the name of the column.
Caution: To keep the color of the text when selecting a row in a browsing Table control, ..Color must be used in the process called "Selecting a table row".
Versions 19 and later
WEBDEV - Browser code ..Color is available in browser code only for browser Table controls on:
  • The table rows (browser).
  • The table columns (browser).
  • The table cells (browser).
This property is not available in browser code for classic or Ajax Table controls.
New in version 19
WEBDEV - Browser code ..Color is available in browser code only for browser Table controls on:
  • The table rows (browser).
  • The table columns (browser).
  • The table cells (browser).
This property is not available in browser code for classic or Ajax Table controls.
WEBDEV - Browser code ..Color is available in browser code only for browser Table controls on:
  • The table rows (browser).
  • The table columns (browser).
  • The table cells (browser).
This property is not available in browser code for classic or Ajax Table controls.

Limits

WEBDEV - Server code Limits for the report controls
..Color has no effect on:
  • the Image controls.
  • the Bar Code controls.
  • the RTF controls.
  • the Check Box controls.
  • the Chart controls.
  • Versions 21 and later
    the Signature controls.
    New in version 21
    the Signature controls.
    the Signature controls.
  • the reports.
  • the report blocks.
WEBDEV - Server code Limits for the page controls
..Color has no effect on the menu options.
WEBDEV - Browser code ..Color operates on the following controls:
  • the edit controls.
  • the List Box controls.
  • the Combo Box controls.
  • the Static controls.
  • the elements of a List Box control.
  • the elements of a Combo Box control.
  • the HTML Static controls.
  • the 3-state Button controls.
  • the formatted display controls.
  • Versions 19 and later
    the browser table rows.
    New in version 19
    the browser table rows.
    the browser table rows.
  • Versions 19 and later
    the browser table columns.
    New in version 19
    the browser table columns.
    the browser table columns.
  • Versions 19 and later
    the browser table cells.
    New in version 19
    the browser table cells.
    the browser table cells.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment