I want show a bitmap on xbrowse
I make a simply dbf with this structure
cod c 4
bitmap c 60
on firstrecord there is
cod bitmap
1 .\bitmaps\test1.bmp
Can I show this dbf on a xbrowse showing the bitmap ?
DBSELECTAREA( 1 )
oLbx70 := TXBrowse():New( oFld:aDialogs[6] )
oLbx70:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx70:nColDividerStyle := LINESTYLE_BLACK
oLbx70:nRowDividerStyle := LINESTYLE_BLACK
oLbx70:bClrSelFocus = { || { 0, 16777215 } }
oLbx70:bClrSel = { || { 0, 10853885 } }
oLbx70:nRecSelColor = 15512898
oLbx70:lHScroll := .F.
oLbx70:lVScroll := .T.
oLbx70:lFooter := .T.
oLbx70:nRowHeight := 40
oLbx70:nFooterHeight := 7
// BMP - Number
oCol := oLbx70:AddCol()
oCol:cHeader := "No."
oCol:bStrData := { || (1)->POSITION }
oCol:nWidth := 25
// BMP - Picture
oCol := oLbx70:AddCol()
oCol:cHeader := "Bmp"
oCol:nWidth := 50
oCol:nEditType := TYPE_IMAGE
oCol:lBmpStretch := .f.
oCol:lBmpTransparent := .t.
oCol:nDataBmpAlign := AL_CENTER
oCol:bStrImage := {|oCol, oLbx70| ALLTRIM((1)->FILE) }
// BMP - File
oCol := oLbx70:AddCol()
oCol:cHeader := "File"
oCol:bStrData := { || (1)->FILE }
oCol:nWidth := 365
oCol:nEditType := EDIT_BUTTON
oCol:bEditBlock := {|nRow, nCol, oCol| oCol:Value := GET_BMP(oLbx70) }
// BMP - Top
oCol := oLbx70:AddCol()
oCol:cHeader := "Top"
oCol:bStrData := { || (1)->TOPPOS }
oCol:nWidth := 40
oCol:nDataStrAlign := AL_RIGHT
oCol:nEditType := EDIT_GET
oCol:bOnPostEdit := {|o, v| (DBRLOCK(), (1)->TOPPOS := v, DBUNLOCK() ) }
// BMP - Left
oCol := oLbx70:AddCol()
oCol:cHeader := "Left"
oCol:bStrData := { || (1)->LEFTPOS }
oCol:nWidth := 40
oCol:nDataStrAlign := AL_RIGHT
oCol:nEditType := EDIT_GET
oCol:bOnPostEdit := {|o, v| (DBRLOCK(), (1)->LEFTPOS := v, DBUNLOCK() ) }
aClrCol := { { 0, 16645846 }, { 0, 16512964 } }
oLbx70:bClrStd := { || aClrCol[ oLbx70:KeyNo % 2 + 1 ] }
oLbx70:CreateFromResource( 110 )
...
...
// ----------------------------------
FUNCTION GET_BMP( oLbx70 )
cBMP := cGetFile32("BMP (*.bmp)|*.bmp|","Select a Picture" ,, "\" + CurDir() + "\IMAGES\")
DBRLOCK()
(1)->FILE := cBMP
DBUNLOCK()
RETURN ( cBMP )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 58 guests