by Ruben Fernandez » Wed Sep 15, 2010 4:05 pm
Raymundo, probastes los rbbuton
Aqui te dejo un ejemplo:
REDEFINE RBBTN oBoton1 ID 240 OF oDlg ;
ACTION( GUARDAADD(cNro),lSaleaDD:=.t.,oDlg:End()) BITMAP "SALIR2" ;
PROMPT "&Guardar" LEFT BORDER
oBoton1:SetFont(oFont3 ) ; oBoton1:cToolTip := { " " + CRLF + "Guardar cambios", "Guardar serial" }
aSkin[ SKIN_RED ]:SetSkin( oBoton1 )
FUNCTION BuildSkin( aSkin )
//default skin
aSkin[ SKIN_DEFAULT ] = TSkinRBtn():New()
//skin red
aSkin[ SKIN_RED ] = TSkinRBtn():New()
aSkin[ SKIN_RED ]:nClrBoxIn = RGB( 255,255,255 )
aSkin[ SKIN_RED ]:nClrBoxOut = RGB( 255, 0, 0)
aSkin[ SKIN_RED ]:aGradiant = { { 0.3, RGB( 254, 154, 128 ), RGB( 254, 154, 128 ) }, ;
{ 0.7, RGB( 252, 85, 40 ), RGB( 181, 61, 29 ) } }
aSkin[ SKIN_RED ]:bClrGradNormal = { | lPressed | if ( lPressed,;
{ { 1, RGB( 181, 61, 29 ), RGB( 254, 154, 128 ) } },;
{ { 1, RGB( 254, 154, 128 ), RGB( 181, 61, 29 ) } } ) }
RETURN NIL
//-----------------------------------------------------//
#define BLUE0 RGB( 218, 229, 243 )
#define BLUE1 RGB( 199, 216, 237 )
#define BLUEBOX0 RGB( 141, 178, 227 )
#define BLUEBOX2 RGB( 237, 242, 248 )
CLASS TSkinRBtn
DATA bClrGradNormal
DATA aClrGradOver
DATA bClrGradSubOver
DATA aClrGradUnder
DATA aClrGradBack
DATA aGradiant
DATA bClrText
DATA bClrGradSelectPress
DATA bClrGradSelect
DATA aClrGradBtnGr
DATA nClrBoxIn, nClrBoxOut
METHOD New( bClrGradNormal, aClrGradOver, bClrGradSubOver, aClrGradUnder,;
aClrGradBack, aGradiant, bClrText, bClrGradSelectPress, bClrGradSelect,;
aClrGradBtnGr )
METHOD SetSkin( oRBtn )
ENDCLASS
//-----------------------------------------------------//
METHOD New( bClrGradNormal, aClrGradOver, bClrGradSubOver, aClrGradUnder,;
aClrGradBack, aGradiant, bClrText, bClrGradSelectPress, bClrGradSelect,;
aClrGradBtnGr, nClrBoxIn, nClrBoxOut, nRound ) CLASS TSkinRBtn
DEFAULT aGradiant := { {0.3, BLUE0, BLUE0 }, { 0.7, BLUE1, BLUE0 } }
DEFAULT nClrBoxOut := BLUEBOX0, nClrBoxIn := BLUEBOX2
DEFAULT bClrGradNormal := { | lPressed | if ( lPressed,;
{ ;
{ 1/4, nRGB( 254, 215, 169 ), nRGB( 251, 179, 99 ) } , ;
{ 3/4, nRGB( 250, 155, 50 ), nRGB( 253, 239, 173 ) } ;
},;
{;
{ 1/4, nRGB( 255, 253, 222 ), nRGB( 255, 231, 147 ) } , ;
{ 3/4, nRGB( 255, 215, 86 ), nRGB( 255, 231, 153 ) } ;
} ) }
DEFAULT bClrGradSubOver := { | lPressed | if ( lPressed,;
{ ;
{ 3/4, nRGB( 248, 187, 107 ), nRGB( 253, 171, 98 ) } , ;
{ 1/4, nRGB( 253, 154, 63 ), nRGB( 255, 164, 64 ) };
},;
{;
{ 3/4, nRGB( 255, 253, 222 ), nRGB( 255, 231, 147 ) } , ;
{ 1/4, nRGB( 255, 215, 86 ), nRGB( 255, 231, 153 ) };
} ) }
DEFAULT aClrGradUnder := {|| { {1 , nRGB( 248,186,107), nRGB( 255, 253, 222 ) } } }
DEFAULT aClrGradOver := {|| { {1 , nRGB( 255,215,84), nRGB( 255, 253, 222 ) } } }
DEFAULT aClrGradBack := { { 1 , nRGB( 255, 253, 222 ), nRGB( 255, 253, 222 ) } }
DEFAULT bClrGradSelect := {| lSelected | if( lSelected ,;
{ ;
{1/4, nRGB( 253,212,168 ), nRGB( 251,178,99 ) },;
{3/4, nRGB( 250,157,52 ), nRGB( 252,234,163 ) };
},;
{ ;
{1/4, nRGB( 245,177,110 ), nRGB( 243,165,89 ) },;
{3/4, nRGB( 216,136,52 ), nRGB( 249,202,98 ) } ;
} ) }
DEFAULT bClrGradSelectPress := {| lPressed | if( lPressed ,;
{ ;
{ 1/4, nRGB( 248, 187, 107 ), nRGB( 253, 171, 98 ) } , ;
{ 3/4, nRGB( 253, 154, 63 ), nRGB( 255, 164, 64 ) };
},;
{ ;
{1/4, nRGB( 245,177,110 ), nRGB( 243,165,89 ) },;
{3/4, nRGB( 216,136,52 ), nRGB( 249,202,98 ) } ;
} ) }
DEFAULT aClrGradBtnGr := {|| ;
{ ;
{ 1/4, nRGB( 200, 219, 238 ), nRGB( 201, 221, 246 ) } , ;
{ 3/4, nRGB( 192, 212, 237 ), nRGB( 208, 225, 247 ) };
} }
::bClrGradNormal = bClrGradNormal
::aClrGradOver = aClrGradOver
::bClrGradSubOver= bClrGradSubOver
::aClrGradUnder = aClrGradUnder
::aClrGradBack = aClrGradBack
::bClrGradSelect = bClrGradSelect
::bClrGradSelectPress = bClrGradSelectPress
::aClrGradBtnGr = aClrGradBtnGr
::aGradiant = aGradiant
::nClrBoxIn = nClrBoxIn
::nClrBoxOut = nClrBoxOut
RETURN Self
//-----------------------------------------------------//
METHOD SetSkin( oRBtn ) CLASS TSkinRBtn
IF oRBtn:hBack != NIL
DeleteObject( oRBtn:hBack )
oRBtn:hBack = NIL
ENDIF
oRBtn:bClrGradNormal = ::bClrGradNormal
oRBtn:aClrGradOver = ::aClrGradOver
oRBtn:bClrGradSubOver = ::bClrGradSubOver
oRBtn:aClrGradUnder = ::aClrGradUnder
oRBtn:aClrGradBack = ::aClrGradBack
oRBtn:bClrGradSelect = ::bClrGradSelect
oRBtn:bClrGradSelectPress = ::bClrGradSelectPress
oRBtn:aClrGradBtnGr = ::aClrGradBtnGr
oRBtn:aGradiant = ::aGradiant
oRBtn:nClrBoxIn = ::nClrBoxIn
oRBtn:nClrBoxOut = ::nClrBoxOut
RETURN NIL
Gracias y Saludos
Ruben Fernandez - Uruguay
FWH 11.06, Harbour, Borland 5.82