Página 1 de 1

Bitmap align in browser column

Publicado: Lun Oct 17, 2005 7:13 pm
por Giuseppe Bogetti
Hi,
I have a problem with bitmap alignment in browser column.
I want to center the bitmap in the column.
Whichever value I set to :nBmpMargin the image is drawn always as in the
attache image.
In the OnInizialize method I have added this code:
// Setup alignment for bitmaps in columns
oCol := ::oBrwIndexes:aCols[ tDBFIDX_UNIQUE ]
oCol:nBmpMargin := Int( ( ( oCol:nWidth - 16 ) / 2 ) )
oCol := ::oBrwIndexes:aCols[ tDBFIDX_DESCEND ]
oCol:nBmpMargin := Int( ( ( oCol:nWidth - 16 ) / 2 ) )
To set the image index I use the following code in OnGetData :
METHOD FormIdxDescendGetData( oSender, cText, nImage ) CLASS TDbfTable
// Image index
cText := ""
IF ( Len( ::oBrwIndexes:aArrayData ) > 0 )
IF ( ::oBrwIndexes:aArrayData[ ::oBrwIndexes:nArrayAt,
tDBFIDX_DESCEND ] )
nImage := 2
ELSE
nImage := 1
ENDIF
ENDIF
RETURN Nil
I also set the OnDrawCell method to force white background of cell with
this code.
METHOD FormIdxUniqueDrawCell( oSender, cText, nClrText, nClrPane,
lHighLite ) CLASS TDbfTable
// Background color
nClrPane := clWhite
RETURN Nil
Am I doing something wrong ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
--