PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Font variable
  • Color of the icon bar of the window
  • 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
  • Color of a ListView control
  • Color of an Image control
  • Color of a Tab control
  • Color of a Sidebar control
  • 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).
Note: A Font variable is black by default.
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 17 and later
iPhone/iPad This property is now available for the window controls and for the Font variables in the iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for the window controls and for the Font variables in the iPhone/iPad applications.
iPhone/iPad This property is now available for the window controls and for the Font variables in the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the iPhone/iPad applications.
Android Widget This property is now available in Android Widget mode.
Universal Windows 10 App This property is now available in Windows Store Apps mode.
iPhone/iPad This property is now available for the report controls in the 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 the Table controls and for the table columns in the Android applications and in the iPhone/iPad applications.
New in version 20
AndroidiPhone/iPad This property is now available for the Table controls and for the table columns in the Android applications and in the iPhone/iPad applications.
AndroidiPhone/iPad This property is now available for the Table controls and for the table columns in the Android applications and in the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Versions 22 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the Font variables.
New in version 22
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the Font variables.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the Font variables.
Example
// The text color is modified according to the displayed value
IF EDT_Total>15000 THEN
EDT_Total..Color = LightRed
END
iPhone/iPadWindows MobileUniversal Windows 10 App
// 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 corresponds to:
<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 corresponds to:
Remarks
iPhone/iPadWindows MobileUniversal Windows 10 App

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.
Windows Mobile

Color of the icon bar of the window

  • If the window is an "MDI parent" window, ..Color is used to find out and modify the color of the icon bar of the window.
  • ..Color is ignored if the window is not an "MDI parent" window.

Color of an edit control

..Color is used to find out and modify the color of the text typed.
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

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.
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

Color of the text in a button

..Color is used to find out and modify the color of the text found in a button.
AndroidiPhone/iPadWindows MobileUniversal Windows 10 App

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.
AndroidiPhone/iPadWindows MobileUniversal Windows 10 App

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.
WINDEV Mobile To find out or modify the color of the text displayed in an option of the list box, use the following syntax to identify the element: ListName[RowNum].
For example, the following code is used to color in green the text displayed on the second row of the List Box control:
LIST_List1[2]..Color = LightGreen
Caution: For the rows in a list box, the new color is stored for the visible rows only.
Windows Mobile

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
AndroidiPhone/iPadWindows Mobile

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".
AndroidiPhone/iPad From version 20, the Table controls are available in Mobile (iOS et Android).
Windows Mobile

Color of a ListView control

..Color is used to find out and modify the color of all the captions displayed in a ListView control.
To find out or modify the color of the caption for an option of the ListView control, use the following syntax to identify the element: ListViewName[RowNum].
For example, the following code is used to color in green the text displayed on the second row of the ListView control:
LSV_ListView1[2]..Color = LightGreen
Caution: For the rows of the list, the new color is kept for the visible rows only.
AndroidAndroid Widget iPhone/iPadWindows MobileUniversal Windows 10 App

Color of an Image control

..Color is used to find out and modify the background color of an Image control.
Windows Mobile

Color of a Tab control

Used on a Tab control, ..Color is used to find out and modify the background color of the tabs.
Used on a tab pane, ..Color is used to find out and modify the color of the caption displayed in the tab pane.
For example:
// Modifies the color of the caption for pane 1
TAB_MyTab[1]..Color = LightRed
Windows Mobile

Color of a Sidebar control

..Color is used to find out and modify the background color of the sidebar panes.

Limits

iPhone/iPadWindows MobileUniversal Windows 10 App 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.
Windows Mobile Limits for the window controls
..Color has no effect on the following controls:
  • the menus,
  • the supercontrols,
  • the Slider controls.
Android Widget ..Color only applies to the following elements:
  • Button control.
  • Static control.
  • Image control.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment