4D v14.3

LISTBOX Get row color

Página Inicial

 
4D v14.3
LISTBOX Get row color

LISTBOX Get row color 


 

LISTBOX Get row color ( {* ;} object ; row {; colorType} ) -> Resultado 
Parâmetro Tipo   Descrição
Operador in If specified, object is an object name (string) If omitted, object is a variable
object  Objeto de formulário in Object name (if * is specified) or
Variable (if * is omitted)
row  Inteiro longo in Row number
colorType  Inteiro longo in Listbox font color (default) or Listbox background color
Resultado  Inteiro longo in Color value

Note: This command only works with array type list boxes.

The LISTBOX Get row color command returns the color of a row or a cell in the list box designated by the object and * parameters.

Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a variable. In this case, you pass a variable reference instead of a string. You can designate a list box or a list box column in the object parameter:

  • When object designates a list box, the command returns the color of the row.
  • When object designates a list box column, the command returns the color of the cell.

In row, pass the number of the row whose color you want to get. 

Note: The command does not take any hidden/shown states of the list box rows into account.

In the  colorType parameter, you can pass either the Listbox background color or Listbox font color constant ("List Box" theme) in order to find out the background or font color for the row. If you omit this parameter, the font color is returned.

Warning: a color assigned to a row is not necessarily displayed in every cell of the row (see example). If conflicting color values are set using properties for list boxes or list box columns, an order of priority is applied. For more information, refer to the Design Reference manual.

Exemplo  

Given the following list box:

 vColor:=LISTBOX Get row color(*;"Col5";3)
 vColor2:=LISTBOX Get row color(*;"List Box";3)
 vColor3:=LISTBOX Get row color(*;"List Box";Listbox background color)
  // vColor contains 0xFFFF00 (yellow)
  // vColor2 contains 0x00FF (blue)
  // vColor3 contains 0x00FF0000 (red)

 
PROPRIEDADES 

Produto: 4D
Tema: List Box
Número 1271

 
HISTÓRIA 

New
Criado por: 4D v14

 
VER TAMBÉM 

List box
LISTBOX SET ROW COLOR

 
ARTICLE USAGE

Manual de linguagem 4D ( 4D v14 R2)
Manual de linguagem 4D ( 4D v14 R3)
Manual de linguagem 4D ( 4D v14.3)
Manual de linguagem 4D ( 4D v14 R4)