#include "FiveWin.ch"
//----------------------------------------------------------------------------//
STATIC oDlg
FUNCTION MAIN()
local oBtn1, oBtn2, oBtn3, oBtn4, aColor[4]
aColor[1] := 10526975
aColor[2] := 16777215
aColor[3] := 16768185
aColor[4] := 255
DEFINE DIALOG oDlg SIZE 400, 400
@ 30, 30 BTNBMP oBtn1 ;
SIZE 50, 30 OF oDlg NOBORDER ;
ACTION MsgInfo( "click" )
oBtn1:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { 0.5, aColor[1], aColor[2] }, ;
{ 0.5, aColor[2], aColor[1] } }, ;
{ { 0.5, aColor[3], aColor[1] }, ;
{ 0.5, aColor[1], aColor[3] } } ) }
@ 30, 120 BTNBMP oBtn2 ;
SIZE 50, 30 OF oDlg NOBORDER ;
ACTION MsgInfo( "click" )
oBtn2:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { 0.5, aColor[1], aColor[2] }, ;
{ 0.5, aColor[2], aColor[1] } }, ;
{ { 0.5, aColor[3], aColor[1] }, ;
{ 0.5, aColor[1], aColor[3] } } ) }
@ 90, 30 BTNBMP oBtn3 ;
SIZE 50, 30 OF oDlg NOBORDER ;
PROMPT "&Normal" ;
ACTION ( aColor[1] := 10526975, oBtn1:Refresh(), oBtn2:Refresh() ) ; // back to normal
CENTER
oBtn3:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { 0.5, 10526975, 16777215 }, ;
{ 0.5, 16777215, 10526975 } }, ;
{ { 0.5, 16768185, 10526975 }, ;
{ 0.5, 10526975, 16768185 } } ) }
@ 90, 120 BTNBMP oBtn4 ;
SIZE 50, 30 OF oDlg NOBORDER ;
PROMPT "&Dark" ;
ACTION ( aColor[1] := aColor[4], oBtn1:Refresh(), oBtn2:Refresh() ) ; // change to dark red
CENTER
oBtn4:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
{ { 0.5, 10526975, 16777215 }, ;
{ 0.5, 16777215, 10526975 } }, ;
{ { 0.5, 16768185, 10526975 }, ;
{ 0.5, 10526975, 16768185 } } ) }
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL