help for the sample xbimg.prg

help for the sample xbimg.prg

Postby Silvio » Sun Feb 27, 2011 9:32 pm

I wisjìh create from xbimg.prg sample a test with an archive dbf

I wish create a archive dbf with images with these fields
File C 60
Desc C 60

oApp():oGrid := TXBrowse():New( oApp():oDlg )
oApp():oGrid:nTop := 00
oApp():oGrid:nLeft := nSplit+2
oApp():oGrid:nBottom := oApp():oDlg:nGridBottom
oApp():oGrid:nRight := oApp():oDlg:nGridRight



aBrowse := { { { || "" }, i18n("Image), 10, 0 },;
{ { || CP->file }, i18n("File"), 60, 0 },;
{ { || CP->Desc }, i18n("Desc"), 300, 0 } }


FOR i := 1 TO Len(aBrowse)
oCol := oApp():oGrid:AddCol()
oCol:bStrData := aBrowse[ i, 1 ]
oCol:cHeader := aBrowse[ i, 2 ]
oCol:nWidth := aBrowse[ i, 3 ]
oCol:nDataStrAlign := aBrowse[ i, 4 ]
oCol:nHeadStrAlign := aBrowse[ i, 4 ]
NEXT




WITH OBJECT oApp():oGrid
WITH OBJECT oApp():oGrid:aCols[1]
:nEditType := TYPE_IMAGE
:lBmpStretch := .f.
:lBmpTransparent := .t.
:bStrImage := {|oCol, oBrw|oApp():oGrid:aRow[ 2 ] }
:nDataBmpAlign := AL_CENTER
END

WITH OBJECT oApp():oGrid:aCols[2]
:nEditType := EDIT_BUTTON
:bEditBlock := {|nRow, nCol, oCol| oCol:Value := cGetFile( "*.*", "Select a file" ) }
END
END



oApp():oGrid:SetRDD()
oApp():oGrid:CreateFromCode()



I wish insert the image and insert a record on Desc field

can you help me please?
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 91 guests