image\GroupHeader

image\GroupHeader

Postby Luisão PITBULL » Fri Feb 01, 2013 1: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: Select all  Expand view
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
Luisão PITBULL
 
Posts: 22
Joined: Fri May 04, 2012 3:26 pm

Re: image\GroupHeader

Postby nageswaragunupudi » Sat Feb 02, 2013 2: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: image\GroupHeader

Postby Luisão PITBULL » 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

Image

Code: Select all  Expand view
   
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: Select all  Expand view

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: Select all  Expand view

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
Luisão PITBULL
 
Posts: 22
Joined: Fri May 04, 2012 3:26 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 116 guests