Get...bitmap..action

Get...bitmap..action

Postby Silvio.Falconi » Fri Oct 29, 2021 9:34 am

Image



is it possible to display the button only when the user enters a text in the get?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Get...bitmap..action

Postby Silvio.Falconi » Mon Nov 01, 2021 8:47 pm

SOLUTION ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Get...bitmap..action

Postby karinha » Mon Nov 01, 2021 10:18 pm

Try with Hide() and Show(). Fire a GET ACTION with lCondition.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Get...bitmap..action

Postby karinha » Mon Nov 01, 2021 11:19 pm

Mira se és esto:

Code: Select all  Expand view

// -> \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
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Get...bitmap..action

Postby karinha » Mon Nov 01, 2021 11:58 pm

Ahora con ACTION en BitMap.

Code: Select all  Expand view

// -> \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
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Get...bitmap..action

Postby Silvio.Falconi » Tue Nov 02, 2021 10:20 am

karinha wrote:Ahora con ACTION en BitMap.

Code: Select all  Expand view

// -> \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
 




for a get all this source codes ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: Get...bitmap..action

Postby karinha » Tue Nov 02, 2021 1:20 pm

It was not clear the question in the google translator.

You want the same thing using RESOURCES, is that it?

I didn't understand the question, explain it better. If possible in Spanish or Portuguese.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7808
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 66 guests