is it possible, to add / change Images inside the Record-Browser in Sample < xBrstru.prg > ?
It would make it much easier for me, to display Settings from a Record of the Project-dbf
Maybe something to include for automaticly Image-Detection.
Sample : all Fieldnames starting with "BTN_" are Bitmaps. Any idea ?
The Structure-Browser :
- Code: Select all Expand view
STATIC FUNCTION MakeStruBrowse( oDlg )
LOCAL oBrw, nMaxWidth := 0
oBrw := TXBrowse():new( oDlg )
WITH OBJECT oBrw
:nTop := INT(HGT/2)+5
:nLeft := 10
:nBottom := HGT-10
:nRight := WID-10
:SetArray( CUST->( dbStruct() ), .f. )
END
ASIZE( oBrw:aCols, 4 )
AEVAL( oBrw:aArrayData, { |a| nMaxWidth := Max( nMaxWidth, a[3] ) } )
WITH OBJECT oBrw:AddCol()
:bStrData := ;
:bEditvalue := { || PADR( cValToChar( CUST->( FieldGet( oBrw:nArrayAt ) ) ), nMaxWidth ) }
:nEditType := EDIT_GET
:bOnPostEdit:= { | oCol, xValue, nLastKey | OnEdit( oCol, xValue, nLastKey ) }
END
AEval( oBrw:aCols, { |oCol, nCol| oCol:cHeader := { "FldName", "Typ", "Len", "Dec","Value" }[ nCol ] } )
// needed => oCol:cHeader := { "FldName", "Typ", "Len", "Dec","IMAGE", "Value" }[ nCol ] } )
oBrw:aCols[ 1 ]:nWidth := 80
oBrw:aCols[ 3 ]:nDataStrAlign := AL_RIGHT
oBrw:aCols[ 4 ]:nDataStrAlign := AL_RIGHT
oBrw:nColSel := 5
oBrw:lUpdate := .t.
SetBrwStyle( oBrw )
oBrw:CreateFromCode()
RETURN ( oBrw )
Best Regards
Uwe