(Google Spanish):
En un control BROWSE, el siguiente bloque de código muestra dinámicamente el color de fondo de mi fila.
Éxito en un BROWSE.
Sin embargo, cambiar el control a un control GRID quita el cambio de color de fondo de la fila.
In a BROWSE control the following code block dynamically displays my row's background color.
Success in a BROWSE.
However, changing the control to a GRID control removes the row's background color change. My code block:
Code: Select all
bkRowColor := { || iif( ( ( By_State->LLR == "Y" ) ;
.OR. ( By_State->TAA == "Y" ) ;
.OR. ( By_State->OJG == "Y" ) ) ;
, iif( empty( By_State->MergeState ), {255,255,255}, {190,255,170} ), {255,150,150} ) }
A SIMPLE TEST EXAMPLE: C:\HMG.3.4.4\Samples\Controls\Grid\GRID_29\Demo.PRG
1) Make some changes to table TEST.DBF to vary the row's backcolor:
Some Test->Last values to empty and
Some Test->Married values to .F.
2) Make two additions to Demo.PRG
Add:
Code: Select all
public bkRowColor := { || iif( ! empty( Test->Last ) ;
, iif( Test->Married == .T., {255,255,255}, {190,255,170} ), {255,150,150} ) }
// Add this as the last line in the GRID's declaration:
DYNAMICBACKCOLOR { bkRowColor, bkRowColor, bkRowColor, bkRowColor, bkRowColor, bkRowColor }
Thank you,
Red2