by Eajunior » Mon Jun 23, 2008 11:13 pm
how can I do to change the column of bitmaps according to the index active, as prg below
********************************
REDEFINE BROWSE oTbr ALIAS "Estoque" ID 100 OF oDlg
ADD COLUMN TO oTbr HEADER "Código" SIZE 125 ALIGN DT_LEFT ORDER "Codigo" DATA TransField( Estoque->Est_Cod, oPub:wEstPic )
ADD COLUMN TO oTbr HEADER "Descrição" SIZE 376 ALIGN DT_LEFT ORDER "Nome" DATA Estoque->Est_Nom
ADD COLUMN TO oTbr HEADER "Grupo" SIZE 205 ALIGN DT_LEFT ORDER "Grupo" DATA Fetch( Estoque->Est_GruCod , "GrupoProduto", "Est_GruNom", "Codigo" )
ADD COLUMN TO oTbr HEADER "Fabricante" SIZE 165 ALIGN DT_LEFT ORDER "Marca" DATA Fetch( "201" + Estoque->Est_FabCod, "TabArray" , "Tab_Nom" , "Codigo" )
ADD COLUMN TO oTbr HEADER "Familia" SIZE 97 ALIGN DT_LEFT DATA ASeek( Estoque->Est_FamCod, oPub:aCodFamilia, oPub:aTabFamilia )
oTbr:cAlias := "Estoque"
oTbr:nHeightHead := 30
oTbr:nHeightCell := 25
oTbr:l2007 := True
oTbr:aColumns[1]:lSeek := True
oTbr:aColumns[2]:lSeek := True
oTbr:bKeyDown := {|nKey| IIF( nKey == VK_RETURN, Estoque_Consulta( oTbr, oVar ), ) }
oTbr:bLDblClick := {|| Estoque_Consulta( oTbr, oVar ) }
oTbr:ChangeFont( oPub:hFntBarra, , 2 )
oTbr:SetIndexCols( 1, 2 )
oTbr:SetColor( { 2, 4, 5, 6, 11, 12, 14, 15 } ,;
{ {|| IF( oTbr:nLogicPos % 2 = 0, oPub:nClrBrw1, oPub:nClrBrw2 ) },;
{ GetSysColor(9), CLR_HGRAY } ,;
{ CLR_BLACK } ,;
{ nRgb( 254,112,0 ), nRgb( 251,219,181 ) } ,;
{ CLR_BLACK } ,;
{ nRgb( 254,112,0 ), nRgb( 251,219,181 ) } ,;
{ GetSysColor(9), CLR_YELLOW } ,;
{ CLR_GRAY } } )
*************************************
Elias Abrão Júnior
Indaiatuba - SP - Brasil
XHarbour 1.10 - Fivewin 2.5 - xMate