Error with array bitmaps

Error with array bitmaps

Postby Silvio » Fri Apr 17, 2009 9:42 am

I add on an array oDTipGrad the value of a dbf record (oDTipGrad)->Bitmap



Apri_Dbf("Tabelle" )
(oDTipGrad)->(DbSeek("G"))
DO WHILE (oDTipGrad)->CveTab="G" .AND. !(oDTipGrad)->(EoF())
AAdd(aGradiBmp,(oDTipGrad)->Bitmap)
(oDTipGrad)->(DbSkip())
ENDDO
Chiudi_Dbf("Tabelle",oDTipGrad)


then I create the xbrowse
and I must show the bitmap on xbrowse

oCol:= oApp():oGrid:AddCol()
oCol:AddResource("sort1") // this for Header
oCol:AddResource("sort2") // this for the header
oCol:cHeader := "Grado"
oCol:nHeadBmpNo := if( (oDVds)->( ORDNUMBER() ) == 7, 1, 2)
oCol:nHeadBmpAlign := AL_RIGHT
oCol:bLClickHeader :={ ||(Sel_Index(6,oDVds) , oApp():oTab:nOption:=6,oApp():oTab:refresh()) }

oCol:AddBmpFile(aGradiBmp[(oDVds)->GRADO])
oCol:bStrData := { || (oDVds)->GRADO}

oCol:bBmpData := { || (oDVds)->GRADO+2}
oCol:nWidth :=40


But Not run ok !!!
have you an Idea ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Error with array bitmaps

Postby nageswaragunupudi » Fri Apr 17, 2009 10:03 am

I am assuming aGradiBmp is an array of bitmap file names.
If understood you correctly, try
Code: Select all  Expand view

AEval( aGradiBmp, { |cBmpFile| oCol:AddBmpFile(cBmpFile)} )
 

instead of
Code: Select all  Expand view

oCol:AddBmpFile(aGradiBmp[(oDVds)->GRADO])
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error with array bitmaps

Postby Silvio » Fri Apr 17, 2009 10:32 am

Nas,
Now I can show the bitmaps but
Not run ok
Perhaps not found cBmpFile

I save on aGradiBmp a string with the name of cBmpFile

sample :
".\bitmaps\gra001.bmp"

I have on dbf 27 bitmaps now
and if the odvs->grado = 9 it take the grad007.bmp instead grad009.bmp

the problem I inser two another bmp for the header bmp
oCol:AddResource("sort1")
oCol:AddResource("sort2")
and I must sum to aGradiBmp + 2

do you understand me ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Error with array bitmaps

Postby nageswaragunupudi » Fri Apr 17, 2009 11:44 am

>
sample :
".\bitmaps\gra001.bmp"

>
first please test with absolute paths. Later you can work with relative paths.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Error with array bitmaps

Postby Silvio » Fri Apr 17, 2009 6:39 pm

ooopss sorry now run I made a mistake
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests