FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour image\GroupHeader
Posts: 22
Joined: Fri May 04, 2012 03:26 PM
image\GroupHeader
Posted: Fri Feb 01, 2013 01:48 PM
Guys, someone would have any tips on how to change the image in GroupHeader at runtime

I tried to use this example of samples

Code (fw): Select all Collapse
oBrw:aCols[i]:bLClickHeader := { | nMRow, nMCol, nFlags, Self | If( ::nHeadBmpNo == 2, ::nHeadBmpNo := 1, ::nHeadBmpNo := 2 ), ::oBrw:Refresh() }


replacing nHead by n nGrp not the right


Luiz Fernando
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: image\GroupHeader
Posted: Sat Feb 02, 2013 02:41 PM

If you want to change the bitmap of the Group Header, then change the nGrpBmpNo of the first column in the Group

Regards



G. N. Rao.

Hyderabad, India
Posts: 22
Joined: Fri May 04, 2012 03:26 PM
Re: image\GroupHeader
Posted: Mon Feb 04, 2013 11:15 PM
nageswaragunupudi wrote:If you want to change the bitmap of the Group Header, then change the nGrpBmpNo of the first column in the Group



Once marked, but does not clear, there is no way to change the image in termpo execution



Code (fw): Select all Collapse
    
for i:=2 to (len(aCliente)*2)+1 
      DefineColuna(i,oBrw,nGet,aCliente)
next
     
with OBJECT oBrw
    j:=1
    for i:=1 to len(aCliente) 
         :SetGroupHeader( aCabecalho[i,1],  j+1, j+2, Arial12B )
         oBrw:aCols[j+2]:AddBmpFile( 'delete12' )
         oBrw:aCols[j+2]:AddBmpFile( '' )
         if aCabecalho[i,3]=='S'
             oBrw:aCols[j+2]:nGrpBmpNo  := 1
        else
             oBrw:aCols[j+2]:nGrpBmpNo  := 2
        endif
        j=j+2
   next
 end

Code (fw): Select all Collapse
Procedure DefineColuna(i,oBrw,nGet,aCliente)
  if numero_impar(i)
     oBrw:aCols[i]:cHeader       := "Qtd"
     oBrw:aCols[i]:nWidth        := 40
     oBrw:aCols[i]:oDataFont     := Couriern6
     oBrw:aCols[i]:nHeadStrAlign := AL_RIGHT              
     oBrw:aCols[i]:nDataStrAlign := AL_RIGHT
     oBrw:aCols[i]:bstrData      := {|| trans(aVendas[oBrw:nArrayAt,i+1],'@E 999.99')}
     oBrw:aCols[i]:cEditPicture  := "@E 999.99" 
     oBrw:aCols[i]:nEditType     := EDIT_GET        
     oBrw:aCols[i]:bonPostEdit   := { | oCol, uValue, nLastKey | If( nLastKey == 13, aVendas[oBrw:nArrayAt,i+1] := uValue,  nil )  } 
     oBrw:aCols[i]:bEditValid    := { | oGet,oCol | EditCampo(aVendas,oBrw:nArrayAT,oBrw,oGet,"QTD",nGet,aCliente) } 
     oBrw:aCols[i]:bClrStd       := { || iif(aVendas[oBrw:nArrayAt,i+1]>0,{COR_PRETO,COR_BRANCO},{COR_BRANCO,COR_BRANCO}) }
     oBrw:aCols[i]:bLClickHeader := {|r,c,f,o| fecha_cliente(oBrw,nGet,1,o:cGrpHdr,o:nCreationOrder) }
  else
     oBrw:aCols[i]:cHeader       := "Valor"
     oBrw:aCols[i]:nWidth        := 40
     oBrw:aCols[i]:oDataFont     := Couriern6
     oBrw:aCols[i]:nHeadStrAlign := AL_RIGHT              
     oBrw:aCols[i]:nDataStrAlign := AL_RIGHT
     oBrw:aCols[i]:bstrData      := {|| trans(aVendas[oBrw:nArrayAt,i+1],'@E 99,999.99')}
     oBrw:aCols[i]:cEditPicture  := "@E 99,999.99" 
     oBrw:aCols[i]:nEditType     := EDIT_GET        
     oBrw:aCols[i]:bonPostEdit   := { | oCol, uValue, nLastKey | If( nLastKey == 13, aVendas[oBrw:nArrayAt,i+1] := uValue,  nil )  } 
     oBrw:aCols[i]:bEditValid    := { | oGet,oCol | EditCampo(aVendas,oBrw:nArrayAT,oBrw,oGet,"VLR",nGet,aCliente) } 
     oBrw:aCols[i]:bClrStd       := { || iif(aVendas[oBrw:nArrayAt,i+1]>0,{COR_PRETO,COR_BRANCO},{COR_BRANCO,COR_BRANCO}) }
     oBrw:aCols[i]:bLClickHeader := { | r,c,f,o| fecha_cliente(oBrw,nGet,2,o:cGrpHdr,o:nCreationOrder) }
 endif
Return nil


Code (fw): Select all Collapse
function fecha_cliente(oBrw,nGet,nLocal,cCli,cColuna)
  if numero_impar(cColuna)
     oBrw:aCols[cColuna+1]:nGrpBmpNo := 1
  else
     oBrw:aCols[cColuna]:nGrpBmpNo := 2
  endif
  oBrw:refresh()
return .t.













Luiz Fernando

Continue the discussion