Rao,
I modify your test inserting the gradient I use and the color of border
Code: Select all | Expand
#include "fivewin.ch"
function test()
local oDlg, oBtn, hBmp := LinesBmp()
local lEnabled := .t.
DEFINE DIALOG oDlg SIZE 200,200 PIXEL TRUEPIXEL
@ 40,60 BTNBMP oBtn ;
FILE "C:\WORK\FWH\bitmaps\pngs\image1.png", "", hBmp, "" ;
SIZE 64,64 PIXEL FLAT NOROUND GDIP WHEN lEnabled OF oDlg
oBtn:nClrBorder := RGB(195,195,185)
oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
{ { 0.25, RGB( 245,245,235), RGB(250,250,245) },;
{ 0.75, RGB(250,250,245), RGB( 245,245,235) } },;
{ { 0.25, RGB(250,250,245), RGB( 245,245,235) }, ;
{ 0.75, RGB( 245,245,235), RGB(250,250,245) } } ) }
@ 130,60 CHECKBOX lEnabled PROMPT "ENABLED" ;
SIZE 80,20 PIXEL OF oDlg
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
static function LinesBmp()
local hBmp, oBrush
DEFINE BRUSH oBrush STYLE BDIAGONAL COLOR CLR_GRAY
hBmp := FW_MakeYourBitmap( 96,96, <|hDC,w,h|
FillRect( hDC, { 0,0,95,95 }, oBrush:hBrush )
return nil
> )
RELEASE BRUSH oBrush
return hBmp
if you enlarge the button with a zoom you will see that there are
problems which I've been asking for a long time
i.e. both the gradient and the oblique lines come out of the edge of the button
if you want to change the border online it is not possible because it is always black
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com