I have array xbrowse sample with logical columns. When It runs, Logical values (.t., .f.) is printed with checkon, chechoff bmps.
1) How can I delete .t. or .f. printout?
2) How can i center the bmps in colums?
Thanks,
Code: Select all
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oDlg,oBrw1, aData
aData := {{"Aaaaaaaaaa",.T.,.T.,.T.,.T.},;
{"Bbbbbbbbbb",.T.,.f.,.T.,.T.},;
{"Cccccccccc",.T.,.T.,.T.,.T.},;
{"Dddddddddd",.f.,.T.,.f.,.T.},;
{"Eeeeeeeeee",.T.,.T.,.T.,.f.}}
DEFINE DIALOG oDlg TITLE "I am a DialogBox" PIXEL SIZE 600,400
@ 0,0 XBROWSE oBrw1 OF oDlg ;
COLUMNS {1, 2, 3, 4, 5} ;
HEADERS {"Procedure", "Add","Edit","Delete","Monitor"} ;
ARRAY aData ;
AUTOSORT SIZE 200,100
if ! Empty( oCol := oBrw1:oCol( "Add" ) )
oCol:SetCheck( { "ON", "OFF" } )
oCol:cSortOrder := nil
//oCol:lBmpStretch = .T.
oCol:nWidth := 50
oCol:SetAlign(2)
endif
if ! Empty( oCol := oBrw1:oCol( "Edit" ) )
oCol:SetCheck( { "ON", "OFF" } )
oCol:cSortOrder := nil
// oCol:lBmpStretch = .T.
endif
if ! Empty( oCol := oBrw1:oCol( "Delete" ) )
oCol:SetCheck( { "ON", "OFF" } )
oCol:cSortOrder := nil
// oCol:lBmpStretch = .T.
endif
if ! Empty( oCol := oBrw1:oCol( "Monitor" ) )
oCol:SetCheck( { "ON", "OFF" } )
oCol:cSortOrder := nil
// oCol:lBmpStretch = .T.
endif
oBrw1:nMarqueeStyle := 5
oBrw1:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
Code: Select all
ON BITMAP "checkon.bmp"
OFF BITMAP "checkoff.bmp"