If you want to solve this issue also, please do one more correction to xbrowse.prg method PaintData
Locate this line:
- Code: Select all Expand view
// Paint bitmaps
DEFAULT aBitmap[ BITMAP_ZEROCLR ] := GetZeroZeroClr( hDC, aBitmap[ BITMAP_HANDLE ] )
Please remove "DEFAULT".
Revised code is:
- Code: Select all Expand view
// Paint bitmaps
aBitmap[ BITMAP_ZEROCLR ] := GetZeroZeroClr( hDC, aBitmap[ BITMAP_HANDLE ] )
Now for testing, I am posting here a modified xbrowgrd.prg from samples folder:
- Code: Select all Expand view
#include 'fivewin.ch'
#include 'xbrowse.ch'
function Main()
local oDlg, oBrw, oFont
local aRowGrad, aSelGrad, aStdGrad
local n := RGB( 157, 248, 255 )
XbrNumFormat( 'E', .t. )
aRowGrad := { { .5, RGB( 0,251,220), RGB(221,255,251) }, ;
{ .5, RGB(221,255,251), RGB( 0,251,220) } }
aSelGrad := { { .5, RGB(255,224,126), RGB(255,255,193) }, ;
{ .5, RGB(255,255,193), RGB(255,224,126) } }
USE CUSTOMER ALIAS CUST
DEFINE FONT oFont NAME 'Tahoma' SIZE 0,-14
DEFINE DIALOG oDlg SIZE 640,440 PIXEL ;
FONT oFont TITLE 'XBrowse Gradient Rows FWH 9.12'
@ 10,10 XBROWSE oBrw OF oDlg ;
SIZE -10,-10 PIXEL ;
COLUMNS 'FIRST', 'HIREDATE', 'MARRIED', 'SALARY' ;
ALIAS 'CUST' LINES NOBORDER
oBrw:Married:SetCheck() // Default FWH Bitmap is Alpha
WITH OBJECT oBrw:First
:AddBitmap( '\fwh\bitmaps\open2.bmp' ) // non-alpha bitmap
:bBmpData := { || 1 }
END
WITH OBJECT oBrw:HireDate
:AddBitmap( '\fwh\bitmaps\Alphabmp\task.bmp' ) // alpha
:bBmpData := { || 1 }
END
WITH OBJECT oBrw
:nStretchCol := 1
:nMarqueeStyle := 4
:bClrSelFocus := { || { CLR_BLACK, aSelGrad } }
:bClrRowFocus := { || { CLR_BLACK, aRowGrad } }
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
CLOSE CUST
RELEASE FONT oFont
return nil
Before corrections:
Column 1 is normal bitmap and columns 2 and 3 are Alpha bitmaps.
After making the two corrections to xbrowse.prg
The TWO corrections should solve the issue. Please check with your bitmaps and I hope you will get acceptable result.
In any case we get a better appearance with Alpha Bitmaps.