// -> \SAMPLES\GETACTIO.PRG - 01/11/2021 - kapiabafwh@gmail.com
#Include "FiveWin.ch"
STATIC lLookButton := .F.
FUNCTION Main()
LOCAL oDlg, oGrabar, oSalida, oFont, oFnt, nKey := VK_RETURN
LOCAL oGet1, oGet2, oGet3, oGet4
LOCAL cVar1, cVar2, cVar3, cVar4
LOCAL lActive := .f.
cVar1 := "Grabar "
cVar2 := 0
cVar3 := 0
cVar4 := 0
SkinButtons()
SetGetColorFocus( CLR_GREEN )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE DIALOG oDlg TITLE "Silvio: GET Action" PIXEL SIZE 300, 300 ;
COLORS CLR_BLACK, CLR_WHITE TRANSPARENT
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
@ 10,10 GET oGet1 VAR cVar1 bitmap "..\bitmaps\on.bmp" OF oDlg ;
PIXEL SIZE 60,12 ;
VALID( SHOW_GET_SILVIO( cVar1, oGrabar ) )
oGet1:cToolTip := "Hide() .And. Show() For Silvio Falconi"
oGet1:lBtnTransparent := .T. // transparent button get oGet1
oGet1:lAdjustBtn := .T. // Button Get Adjust
@ 40,10 GET oGet2 VAR cVar2 bitmap "..\bitmaps\on.bmp" ;
ACTION( MsgInfo( "Without Transparent" ) ) OF oDlg PIXEL SIZE 60,12
@ 70,10 GET oGet3 VAR cVar3 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( MsgInfo( "With Adjust-Transparent" ) ) OF oDlg PIXEL SIZE 120, 12
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
@ 100,10 GET oGet4 VAR cVar4 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( if( lActive,oGet3:disable(),oGet3:enable()), lActive:= !lActive, oDlg:update() ) OF oDlg PIXEL SIZE 120,12
oGet4:lAdjustBtn := .T.
@ 130, 20 BUTTON oGrabar PROMPT "&Grabar" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( GRABAR_SILVIO( oGrabar ) )
@ 130, 80 BUTTON oSalida PROMPT "&Salida" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( oDlg:End() ) CANCEL
SET FONT OF oGrabar TO oFont
SET FONT OF oSalida TO oFont
ACTIVATE DIALOG oDlg CENTERED ON INIT( oGrabar:Hide() )
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
RETURN NIL
FUNCTION SHOW_GET_SILVIO( cCVar1, oGrabar )
IF( cCVar1 ) = "GRABAR" .OR. ;
( cCVar1 ) = "Grabar" .OR. ;
( cCVar1 ) = "grabar"
oGrabar:Show()
ENDIF
RETURN( .T. )
FUNCTION GRABAR_SILVIO( oGrabar )
oGrabar:Hide()
//..., etc.
RETURN NIL
// fin / end
// -> \SAMPLES\GETACTIO.PRG - 01/11/2021 - kapiabafwh@gmail.com
#Include "FiveWin.ch"
STATIC lLookButton := .F.
FUNCTION Main()
LOCAL oDlg, oGrabar, oSalida, oFont, oFnt, nKey := VK_RETURN
LOCAL oGet1, oGet2, oGet3, oGet4
LOCAL cVar1, cVar2, cVar3, cVar4
LOCAL lActive := .f.
cVar1 := "Grabar "
cVar2 := 0
cVar3 := 0
cVar4 := 0
SkinButtons()
SetGetColorFocus( CLR_GREEN )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE DIALOG oDlg TITLE "Silvio: GET Action" PIXEL SIZE 300, 300 ;
COLORS CLR_BLACK, CLR_WHITE TRANSPARENT
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
@ 10,10 GET oGet1 VAR cVar1 bitmap "..\bitmaps\on.bmp" OF oDlg ;
PIXEL SIZE 60,12 ;
ACTION( SHOW_GET_SILVIO( cVar1, oGrabar ) ) ;
VALID( SHOW_GET_SILVIO( cVar1, oGrabar ) )
oGet1:cToolTip := "Hide() .And. Show() For Silvio Falconi"
oGet1:lBtnTransparent := .T. // transparent button get oGet1
oGet1:lAdjustBtn := .T. // Button Get Adjust
// <F7> action in GET
oGet1:bKeyDown := { |nKey| IF( nKey == VK_F7, Eval( oGet1:bAction ), Nil ) }
@ 40,10 GET oGet2 VAR cVar2 bitmap "..\bitmaps\on.bmp" ;
ACTION( MsgInfo( "Without Transparent" ) ) OF oDlg PIXEL SIZE 60,12
@ 70,10 GET oGet3 VAR cVar3 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( MsgInfo( "With Adjust-Transparent" ) ) OF oDlg PIXEL SIZE 120, 12
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
@ 100,10 GET oGet4 VAR cVar4 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( if( lActive,oGet3:disable(),oGet3:enable()), lActive:= !lActive, oDlg:update() ) OF oDlg PIXEL SIZE 120,12
oGet4:lAdjustBtn := .T.
@ 130, 20 BUTTON oGrabar PROMPT "&Grabar" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( GRABAR_SILVIO( oGrabar ) )
@ 130, 80 BUTTON oSalida PROMPT "&Salida" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( oDlg:End() ) CANCEL
SET FONT OF oGrabar TO oFont
SET FONT OF oSalida TO oFont
ACTIVATE DIALOG oDlg CENTERED ON INIT( oGrabar:Hide() )
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
RETURN NIL
FUNCTION SHOW_GET_SILVIO( cCVar1, oGrabar )
IF( cCVar1 ) = "GRABAR" .OR. ;
( cCVar1 ) = "Grabar" .OR. ;
( cCVar1 ) = "grabar"
oGrabar:Show()
ENDIF
RETURN( .T. )
FUNCTION GRABAR_SILVIO( oGrabar )
oGrabar:Hide()
//..., etc.
RETURN NIL
// fin / end
karinha wrote:Ahora con ACTION en BitMap.
- Code: Select all Expand view RUN
// -> \SAMPLES\GETACTIO.PRG - 01/11/2021 - kapiabafwh@gmail.com
#Include "FiveWin.ch"
STATIC lLookButton := .F.
FUNCTION Main()
LOCAL oDlg, oGrabar, oSalida, oFont, oFnt, nKey := VK_RETURN
LOCAL oGet1, oGet2, oGet3, oGet4
LOCAL cVar1, cVar2, cVar3, cVar4
LOCAL lActive := .f.
cVar1 := "Grabar "
cVar2 := 0
cVar3 := 0
cVar4 := 0
SkinButtons()
SetGetColorFocus( CLR_GREEN )
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, -14 BOLD
DEFINE FONT oFnt NAME "Ms Sans Serif" SIZE 00, -12 BOLD
DEFINE DIALOG oDlg TITLE "Silvio: GET Action" PIXEL SIZE 300, 300 ;
COLORS CLR_BLACK, CLR_WHITE TRANSPARENT
oDlg:lHelpIcon := .F.
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
@ 10,10 GET oGet1 VAR cVar1 bitmap "..\bitmaps\on.bmp" OF oDlg ;
PIXEL SIZE 60,12 ;
ACTION( SHOW_GET_SILVIO( cVar1, oGrabar ) ) ;
VALID( SHOW_GET_SILVIO( cVar1, oGrabar ) )
oGet1:cToolTip := "Hide() .And. Show() For Silvio Falconi"
oGet1:lBtnTransparent := .T. // transparent button get oGet1
oGet1:lAdjustBtn := .T. // Button Get Adjust
// <F7> action in GET
oGet1:bKeyDown := { |nKey| IF( nKey == VK_F7, Eval( oGet1:bAction ), Nil ) }
@ 40,10 GET oGet2 VAR cVar2 bitmap "..\bitmaps\on.bmp" ;
ACTION( MsgInfo( "Without Transparent" ) ) OF oDlg PIXEL SIZE 60,12
@ 70,10 GET oGet3 VAR cVar3 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( MsgInfo( "With Adjust-Transparent" ) ) OF oDlg PIXEL SIZE 120, 12
oGet3:lBtnTransparent := .T. // transparent button get oGet3
oGet3:lAdjustBtn := .T. // Button Get Adjust Witdh oGet3
@ 100,10 GET oGet4 VAR cVar4 bitmap "..\bitmaps\chkyes.bmp" ;
ACTION( if( lActive,oGet3:disable(),oGet3:enable()), lActive:= !lActive, oDlg:update() ) OF oDlg PIXEL SIZE 120,12
oGet4:lAdjustBtn := .T.
@ 130, 20 BUTTON oGrabar PROMPT "&Grabar" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( GRABAR_SILVIO( oGrabar ) )
@ 130, 80 BUTTON oSalida PROMPT "&Salida" SIZE 50, 12 OF oDlg PIXEL ;
ACTION( oDlg:End() ) CANCEL
SET FONT OF oGrabar TO oFont
SET FONT OF oSalida TO oFont
ACTIVATE DIALOG oDlg CENTERED ON INIT( oGrabar:Hide() )
IF Set( _SET_INSERT, ! Set( _SET_INSERT ) )
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
ENDIF
RETURN NIL
FUNCTION SHOW_GET_SILVIO( cCVar1, oGrabar )
IF( cCVar1 ) = "GRABAR" .OR. ;
( cCVar1 ) = "Grabar" .OR. ;
( cCVar1 ) = "grabar"
oGrabar:Show()
ENDIF
RETURN( .T. )
FUNCTION GRABAR_SILVIO( oGrabar )
oGrabar:Hide()
//..., etc.
RETURN NIL
// fin / end
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 35 guests