I would like to propose these changes to the fwteam
#define WHITE_PEN 6 // add this on top
METHOD PaintBorder() CLASS TBtnBmp
local nAdjustBorder := 0
local nWidth, nAdj, oCli
local nRound := If( ::lRound, ::nRound, 0 )
local hWhitePen, hGrayPen, hOldPen add these
line 1752
- Code: Select all Expand view
//if ! ::lPressed
if ! ::lMOver
hGrayPen := CreatePen (PS_SOLID,1,::nClrBorder)
hWhitePen := GetStockObject (WHITE_PEN)
hOldPen := SelectObject(::hDC,hWhitePen)
Moveto (::hDC, 0, ::nHeight - nAdjustBorder - 1)
Lineto (::hDC, 0, 0)
Lineto (::hDC, ::nWidth - nAdjustBorder - 1, 0)
SelectObject (::hDC, hOldPen)
hOldPen := SelectObject(::hDC, hGrayPen)
Moveto (::hDC, 1 , ::nHeight - nAdjustBorder - 3)
Lineto (::hDC, ::nWidth - nAdjustBorder -3, ::nHeight - nAdjustBorder - 3)
Lineto (::hDC, ::nWidth - nAdjustBorder -3, 1)
SelectObject(::hDC, hOldPen)
DeleteObject (hGrayPen)
// WndRaised( ::hWnd, ::hDC )
else
hGrayPen := CreatePen (PS_SOLID,1,::nClrBorder)
hOldPen := SelectObject(::hDC,hGrayPen)
Moveto (::hDC, 0, ::nHeight - nAdjustBorder - 1)
Lineto (::hDC, 0, 0)
Lineto (::hDC, ::nWidth - nAdjustBorder - 1, 0)
SelectObject(::hDC, hOldPen)
DeleteObject (hGrayPen)
// WndInset( ::hWnd, ::hDC )
endif
instead of
- Code: Select all Expand view
if ! ::lPressed
WndRaised( ::hWnd, ::hDC )
else
WndInset( ::hWnd, ::hDC )
endif
now seem run ok the border color
I set the btnbmps into the scrollpanel with
:nClrBorder := { || (IIF(ocontrol:lMOver,CLR_BLUE,CLR_HGRAY)) }