Another for Btnbmp
Posted: Tue Mar 19, 2024 11:59 am
I have two btnbmp
when I press a button then a black border forms how do I remove the black border?
the test
the black border would be the focus but it's ugly to see how do I remove it or how can I change its color?
when I press a button then a black border forms how do I remove the black border?
the test
Code: Select all | Expand
Function test()
local oDlg,oFont,oBold
local oCursorBtn :=TCursor():New(,'HAND')
local oBtn:=array(2)
local nWd := GetSysMetrics(0) * .58
local nHt := (GetSysMetrics(1) / 2 ) -20
oFont := TFont():New( "TAHOMA", 0, 14,, )
oBold := TFont():New( "TAHOMA", 0, 14,,.t. )
DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL ;
FONT oFont COLOR CLR_BLACK, RGB( 245,245,235) ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MINIMIZEBOX)
@ 10, 30 BTNBMP obtn[1] ;
PROMPT "text" LEFT ;
FILENAME "1.bmp" ;
SIZE 45, 13 PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL
@ 30, 30 BTNBMP obtn[2] ;
PROMPT "text" LEFT ;
FILENAME "2.bmp" ;
SIZE 45, 13 PIXEL FLAT NOROUND GDIP OF oDlg ;
ACTION NIL
For n= 1 to len(oBtn)
obtn[n]:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, RGB( 250,250,245), RGB( 250,250,245)} },;
{ { 1, RGB( 245,245,235), RGB( 245,245,235)} } ) }
obtn[n]:nClrBorder := RGB(195,195,185)
obtn[n]:oCursor:= oCursorBtn
next
Activate DIALOG oDlg
return nil