FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error with array bitmaps
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Error with array bitmaps
Posted: Fri Apr 17, 2009 09: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():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():=6,oApp():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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error with array bitmaps
Posted: Fri Apr 17, 2009 10:03 AM
I am assuming aGradiBmp is an array of bitmap file names.
If understood you correctly, try
Code (fw): Select all Collapse
AEval( aGradiBmp, { |cBmpFile| oCol:AddBmpFile(cBmpFile)} )

instead of
Code (fw): Select all Collapse
oCol:AddBmpFile(aGradiBmp[(oDVds)->GRADO])
Regards



G. N. Rao.

Hyderabad, India
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Error with array bitmaps
Posted: 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error with array bitmaps
Posted: 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
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Error with array bitmaps
Posted: Fri Apr 17, 2009 06:39 PM

ooopss sorry now run I made a mistake

Best Regards, Saludos



Falconi Silvio

Continue the discussion