Buenos días Darío Fernández, tienes razón, existen muchas diferencias entre BTNBMP y RBNT.
Code: Select all | Expand
// C:\FWH\SAMPLES\BTN.PRG y BTN.RC con RBTN incluso. Diferencias Visibles.
#include "Fivewin.ch"
#include "Ribbon.ch"
FUNCTION Main()
LOCAL oDlg, oSay, oSay2, oSay3, oBtn, oAceptar, oCancelar, oFont, oBtnRb1,;
oBtnRb2
SetBalloon( .T. ) // Balloon shape required for tooltips
SkinButtons()
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -16 BOLD
DEFINE DIALOG oDlg RESOURCE "TEST" TITLE "TESTE BTNBMP Y RBTN FWH19.05" /* ;
TRANSPARENT */ // -> NO FUNCIONA CON RBTN ?? Master Nages??
oDlg:lHelpIcon := .F.
REDEFINE SAY oSay ID 401 OF oDlg COLORS METRO_CRIMSON, METRO_AMBER ;
FONT oFont UPDATE CENTER ADJUST
REDEFINE SAY oSay2 ID 402 OF oDlg COLORS METRO_CRIMSON, METRO_AMBER ;
FONT oFont UPDATE CENTER ADJUST
REDEFINE SAY oSay3 ID 403 OF oDlg COLORS METRO_CRIMSON, METRO_AMBER ;
FONT oFont UPDATE CENTER ADJUST
REDEFINE BTNBMP oBtn ID 101 OF oDlg RESOURCE "TEST" PROMPT "&Teste" ;
FLAT 2007 FONT oFont
oBtn:cToolTip := "Test BITMAP 16 x 16"
oBtn:nRound := 60
REDEFINE BTNBMP oAceptar ID 301 OF oDlg RESOURCE "ACEPTAR" ;
PROMPT "&Aceptar" FLAT 2007 NOBORDER ROUND FONT oFont LEFT ;
ACTION MsgInfo( "Aceptar BTNBMP" )
oAceptar:cToolTip := "Aceptar BITMAP 32 x 32"
REDEFINE BTNBMP oCancelar ID 302 OF oDlg RESOURCE "CANCELAR" ;
PROMPT "&Cancelar" FLAT 2007 NOBORDER ROUND FONT oFont LEFT ;
ACTION( oDlg:End() )
oCancelar:cToolTip := "Cancelar BITMAP 32 x 32"
oCancelar:lCancel := .T.
oCancelar:SetThemed(.T.)
REDEFINE RBBTN oBtnRb1 ID 303 OF oDlg ROUND ACTION MsgInfo( "RBTN1" ) ;
BITMAP "ACEPTAR" PROMPT "A&ceptar" FLAT LEFT FONT oFont
REDEFINE RBBTN oBtnRb2 ID 304 OF oDlg ROUND ACTION MsgInfo( "RBTN2" ) ;
BITMAP "CANCELAR" PROMPT "Cance&lar" FLAT LEFT FONT oFont
GradDlgs( "SolidGreenBlue" )
ACTIVATE DIALOG oDlg CENTERED ON INIT( oBtn:SetThemed( .T. ) )
oFont:End()
RETURN NIL
// ----------------------------------------------------------------------------//
// Gradient for Dialogs: Thanks to Rick Lipkin
// ----------------------------------------------------------------------------//
FUNCTION GradDlgs( cTheme )
LOCAL x
LOCAL aGrad := {}
LOCAL aTmp := {}
LOCAL aThemes := { ;
{ "SolidWhite", { { 0.5, nRGB( 255, 255, 255 ), nRGB( 255, 255, 255 ) } } }, ;
{ "BlueGreen", { { 1.00, 14671839, 7419904 }, { 1.00, 7419904, 14671839 } } }, ;
{ "SolidGreenBlue", { { 0.01, 9994298, 9994298 }, { 0.01, 9994298, 9994298 } } }, ;
{ "SolidDarkBlue", { { 0.50, 4720905, 4720905 }, { 0.50, 4720905, 4720905 } } }, ;
{ "SolidBlue", { { 0.01, 16711680, 16711680 }, { 0.01, 16711680, 16711680 } } }, ;
{ "DarkBlue", { { 0.0, 8388608, 13619151 }, { 0.0, 13619151, 8388608 } } }, ;
{ "LightGreen", { { .50, nRGB( 210, 235, 216 ), nRGB( 255, 255, 255 ) } } }, ;
{ "LightBlue", { { .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } } }, ;
{ "LightGrey", { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } }, ;
{ "Standard", { { .50, nRGB( 236, 233, 216 ), nRGB( 255, 255, 255 ) } } }, ;
{ "DarkGrey", { { 0.87, 16777215, 11513775 }, { 0.87, 11513775, 16777215 } } }, ;
{ "SolidGrey", { { .50, nRGB( 233, 233, 233 ), nRGB( 233, 233, 233 ) } } }, ;
{ "SolidChoral", { { 0.01, 8388736, 8388736 }, { 0.01, 8388736, 8388736 } } }, ;
{ "LightYellow", { { 0.01, 8440801, 16777215 }, { 0.75, 16777215, 8440801 } } }, ;
{ "GreenBlue", { { .50, nRGB( 192, 192, 192 ), nRGB( 45, 121, 147 ) } } } ;
}
DEFAULT cTheme := ""
IF ValType( cTheme ) == "C"
AEval( aThemes, {| a | AAdd( aTmp, Upper( a[ 1 ] ) ) } )
x := AScan( aTmp, Upper( cTheme ) )
IF !Empty( x )
aGrad := aThemes[ x ][ 2 ]
ENDIF
ELSE
IF ValType( cTheme ) == "A"
aGrad := cTheme
ENDIF
ENDIF
IF .NOT. Empty( aGrad )
SetDlgGradient( aGrad )
ENDIF
RETURN( aThemes )
// FIN / END - kapiabafwh@gmail.com
Regards, saludos.