// C:\FWH..\SAMPLES\LEANDRO6.PRG
#include "fivewin.ch"
#include "xbrowse.ch"
FUNCTION Main()
LOCAL oWnd, oBar, oBrw, oFont
LOCAL aLlena := {}
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0, - 12
DEFINE WINDOW oWnd TITLE "Prueba xbrowse 2210"
AAdd( aLlena, { "primera", "segunda", "tercera", "cuarta" } )
AAdd( aLlena, { "quinta", "laseis", "septima", "octava" } )
AAdd( aLlena, { "novena", "decima", "undécima", "doceava" } )
SET MESSAGE OF oWnd TO "" 2007
@ 0, 0 XBROWSE oBrw OF oWnd ;
COLUMNS 1, 2, 3, 4 ;
HEADERS "uno", "dos", "tres", "cuatro" ;
COLSIZES 100, 100, 100, 100 ;
DATASOURCE aLlena LINES STYLE FLAT NOBORDER
WITH OBJECT oBrw
:l2007 := .F.
:lFitGridHeight := .T.
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:lColDividerComplete := .T.
:nColorPen := CLR_HGRAY
:lFullGrid := .T.
:nStretchCol := STRETCHCOL_LAST
:bClrHeader := {|| { CLR_WHITE, CLR_WHITE, CLR_HGRAY } }
:aCols[ 2 ]:oFooterFont := oFont
// Ejemplo Leandro. Funciona bien con FWH1905...
// :aCols[ 2 ]:bClrStd := {|| { Rgb( 55, 55, 55 ), if( aLlena[ oBrw:nArrayAt ][ 2 ] == "decima", nRGB( 212, 0, 212 ), nRGB( 212, 212, 212 ) ) } }
// Asi, tambien funciona.
:aCols[ 2 ]:bClrStd := { || { IF( aLlena[ oBrw:nArrayAt ][ 2 ] == "decima", CLR_GREEN, CLR_WHITE ), CLR_BLACK, CLR_GRAY } }
:bClrHeader := { || { CLR_GREEN, CLR_WHITE, CLR_WHITE } }
:aCols[ 2 ]:bClrSelFocus := {|| { CLR_WHITE, nRGB( 139, 139, 139 ) } }
:CreateFromCode()
END
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
RETURN NIL
// FIN / END