How To Display checkon.bmp
Posted: Sat Feb 22, 2014 3:49 am
Hi
How to make it to display the image "checkon.bmp" and "checkoff.bmp" instead of the words "checkon.bmp" and "checkoff.bmp".
Thanks
Regards
ACWoo
Using FWH1304+harbour+bcc582
Code: Select all
#include 'fivewin.ch'
#include 'ord.ch'
#include 'xbrowse.ch'
local oDlg, oBrw
function Main()
CreateTestDBF()
USE ABC SHARED
select abc
do while !eof()
onerror("RLOCK")
if pass = "Y"
replace image with "checkon.bmp"
else
replace image with "checkoff.bmp"
endif
skip 1
enddo
goto top
DEFINE DIALOG oDlg FROM 0, 0 TO 31.2, 94.8 ;
TITLE "Test" ;
GRADIENT { { 1, nRGB( 199, 216, 237 ), nRGB( 237, 242, 248 ) } }
@ 0,0 XBROWSE oBrw OF oDlg ;
COLUMNS "Name", "Pass", "Image" ;
HEADERS "Name", "Pass", "Image" ;
SIZES 370,170 ;
ALIAS "ABC" CELL LINES
oBrw:nMarqueeStyle := 1
oBrw:nRowHeight := 27
oBrw:aCols[ 1]:nEditType := EDIT_BUTTON
oCol := oBrw:aCols[ 1 ]
oCol:cHeader := "Name"
oCol:nWidth := 78
oCol := oBrw:aCols[ 2 ]
oCol:cHeader := "Pass"
oCol := oBrw:aCols[ 3 ]
oCol:cHeader := "Image"
oDlg:oClient := oBrw
oBrw:CreateFromCode()
ACTIVATE Dialog oDlg
return nil
static function CreateTestDBF()
DbCreate( "ABC.DBF", { { "Name", "C", 255, 0 }, { "Pass", "C", 1, 0 }, { "IMAGE", "C", 255, 0 } } )
USE ABC EXCLUSIVE
Append Blank
onerror("APPEND")
Replace Name With "John"
Replace pass With "Y"
Append Blank
onerror("APPEND")
Replace Name With "Sam"
Replace pass With "N"
CLOSE ABC
return nil
Thanks
Regards
ACWoo
Using FWH1304+harbour+bcc582