AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades varias
  • Font variable
  • Window icon bar color
  • 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
  • Color of a TreeView control
  • Text color of a cell, row or column in a Table control
  • Color of a ListView control
  • Color of an Image control
  • Color of the tabs in a Tab control
  • Color of a Sidebar control
  • Color of a Bar Code control
  • Limitations
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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.
Ejemplo
// The text color is modified according to the displayed value
IF EDT_Total>15000 THEN
EDT_Total.Color = LightRed
END
WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/iPadIOS WidgetMac CatalystCódigo de Usuario (UMC)PHPAjax
// Définir les caractéristiques d'une variable de type Police
Police1 is Font
Police1.Nom = "Arial"
Police1.Couleur = LightYellow
Police1.Taille = 14
Police1.UnitéTaille = unitPoint
Police1.Angle = 45
// Appliquer la police au champ "MonChamp"
MyControl.Police = Police1
Sintaxis

Getting the text color Ocultar los detalles

<Result> = <Element used>.Color
<Result>: Integer or constant
Color of the specified element. This color can correspond to:
WEBDEV - Código Navegador The color is returned as a string by the browser.
<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 Ocultar los detalles

<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:
Observaciones

Font variable

Se puede crear una fuente a partir de una variable de tipo Font.
Para definir las características de la fuente, utilice:
Esta fuente se puede utilizar:
AndroidWidget Android Este tipo de fuente solo puede utilizarse en los controles de una ventana (propiedad Font).
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.
WINDEVJavaCódigo de Usuario (UMC)

Window icon bar color

  • If the window is an "MDI parent" window, the Color property gets and sets the icon bar color.
  • The Color property is ignored if the window is not an "MDI parent" window.

Color of an Edit control

The Color property can be used to identify and modify the color of text entered.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJavaCódigo de Usuario (UMC)PHPAjax

Text color in a Static Text control

The Color property lets you identify and modify the text color of a Static Text control.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidWidget Android iPhone/iPadMac CatalystJavaCódigo de Usuario (UMC)PHPAjax

Text color of a Button control

The Color property lets you identify and modify the color of the text in a Button field.
WINDEVWEBDEV - Código ServidorReportes y ConsultasAndroidiPhone/iPadMac CatalystJavaCódigo de Usuario (UMC)PHPAjax

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.
WINDEVWEBDEV - Código NavegadorReportes y ConsultasAndroidiPhone/iPadMac CatalystJavaCódigo de Usuario (UMC)PHP

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.
WINDEVWINDEV Mobile To get or change the text color of an option in a List Box control, specify the desired option using the following syntax: ListName[RowNum].
For example, the following code applies a green color to the text of the second row of the List Box control:
LIST_List1[2].Color = LightGreen

Attention: For lines in a List Box control, the new color is retained only for visible lines..
WINDEVWEBDEV - Código ServidorJavaCódigo de Usuario (UMC)PHPAjax

Color of a TreeView control

The Color property gets and sets the color of all the labels displayed in a TreeView control.
To get or change the text color of an option in the TreeView control, specify the desired option using one of the following syntaxes:
  • TreeViewName[RowNum]
  • TreeViewName[<Element path>] where Element path is a character string in the following format:
    "<Root name>" + TAB + ["<Name of 1st node>" + TAB +...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
    Examples:
TREE_TreeView2[2].Color = LightGreen // Colors the second row green
TREE_MyTreeView["Recipe" + TAB + "Dessert"].Color = LightRed
WINDEVWEBDEV - Código ServidorWEBDEV - Código NavegadorAndroidiPhone/iPadMac CatalystJavaCódigo de Usuario (UMC)PHPAjax

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

  • To get or change the text color of a cell in a Table control, specify the desired cell using the following syntax: TableName[RowNum][ColumnNum].
    For example, the following code changes the text color in the cell on row 1, column 2:
    TABLE_Table1[1][2].Color = DarkBlue
  • To get or change the text color of a row in a Table control, specify the desired row using the following syntax: TableName[RowNum].
  • To get or change the text color of a column in a Table control, simply use the Color property with the column name.
Caution: To preserve text color when selecting a line in a Table based on a data file field, you need to use the Color property in the "Select table line" event..
WEBDEV - Código Navegador The Color property is available in browser code only for Table controls in "Browser" mode on:
  • Table rows (browser).
  • Table columns (browser).
  • Table cells (browser).
This property is not available in browser code for Table controls in "Server" or "Server + AJAX" mode.
WINDEVJavaCódigo de Usuario (UMC)

Color of a ListView control

The Color property gets and sets the color of all the labels displayed in a ListView control.
To get or change the text color of an option in the ListView control, specify the desired option using the following syntax: ListViewName[RowNum].
For example, the following code applies a green color to the text of the second row of the ListView control:
LSI_ListeImage1[2].Color = LightGreen

Attention: For List Box control lines, the new color is retained only for visible lines.
WINDEVAndroidWidget Android iPhone/iPadIOS WidgetMac CatalystJavaCódigo de Usuario (UMC)

Color of an Image control

The Color property gets and sets the background color of an Image control.
WINDEViPhone/iPadMac CatalystJavaCódigo de Usuario (UMC)

Color of the tabs in a Tab control

When used on a Tab control, the Color property allows you to get and change the background color of the tabs.
When used on a tab, the Color property allows you to get and change the text color of the tabs.
For example:
// Changes the text color of tab 1
TAB_MyTab[1].Color = LightRed
WINDEVCódigo de Usuario (UMC)

Color of a Sidebar control

The Color property gets and sets the background color of the sidebar panes.
WINDEVCódigo de Usuario (UMC)

Color of a Bar Code control

The Color property gets and sets the color used to draw the bar code.

Limitations

WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/iPadIOS WidgetMac Catalyst 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.
WINDEV Limitations on controls in WINDEV windows
The Color property has no effect on the following controls:
  • HTML controls,
  • Web Camera controls,
  • supercontrols,
  • Slider controls.
WEBDEV - Código Navegador The Color property can only be used in the following controls:
  • Edit controls.
  • List Box controls.
  • Combo Box controls.
  • Static Text controls.
  • elements of a List Box control.
  • elements of a Combo Box control.
  • HTML Static controls.
  • 3-state Button controls.
  • formatted display controls.
  • browser table rows.
  • browser table columns.
  • browser table cells.
Java The Color property can only be used with the following elements:
  • Button control.
  • Static Text control.
  • Edit control.
  • Image control.
  • Check Box control.
  • Radio Button control.
  • List Box control.
  • Combo Box control.
  • TreeView control.
  • Tab control.
  • Window.
  • Table control.
  • Table column.
Widget Android The Color property can only be used with the following elements:
  • Button control.
  • Static Text control.
  • Image control.
IOS Widget The Color property can only be used with the following elements:
  • Static Text control.
  • Image control.
  • Window.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local