Hi,
In older fwh key F2 in get with bitmap and action works great but in fwh1811 don't. How I can set f2 in all gets thats contains bitmap and action clause?
Thanks in advance!
// \SAMPLES\ARTIAGA.PRG - 14/02/2022
#include "fivewin.ch"
function main()
local oWnd
local oMenu
menu oMenu
MenuItem "From Code" action FromCode( oWnd )
// MenuItem "From Resource" action FromrES( oWnd )
endmenu
define window oWnd title "Test GET with <F2>" menu oMenu pixel
activate window oWnd MAXIMIZED
return oWnd
Function FromCode( oWnd )
local oDlg
local oGet1, oGet2, oGet3, oGet4
local cVar1, cVar2, cVar3, cVar4
local lActive := .f.
cVar1 := 0
cVar2 := 0
cVar3 := 0
cVar4 := 0
define dialog oDlg title "Test GET with <F2>" pixel size 300,300
oDlg:lHelpIcon := .F.
@ 10,10 get oGet1 var cVar1 bitmap "..\bitmaps\on.bmp" ;
action( TESTE_GET1() ) of oDlg pixel size 60,12
oGet1:cToolTip := OemToAnsi( "<F2> - ACTION con F2 GET 1" )
oGet1:lBtnTransparent := .T. // transparent button
// AQUI:
oGet1:bKeyDown := { |nKey| IF( nKey == VK_F2, Eval( oGet1:bAction ), Nil ) }
oGet1:lAdjustBtn := .t. // Button Get Adjust Witdh oGet3
oGet1:lDisColors := .f. // Deactive disable color
oGet1:nClrTextDis := CLR_WHITE // Color text disable status
oGet1:nClrPaneDis := CLR_BLUE // Color Pane disable status
@ 40,10 get oGet2 var cVar2 bitmap "..\bitmaps\on.bmp" ;
action( TESTE_GET2() ) of oDlg pixel size 60,12
oGet2:cToolTip := OemToAnsi( "<F2> - ACTION con F2 GET 2" )
oGet2:lBtnTransparent := .T. // transparent button
// AQUI:
oGet2:bKeyDown := { |nKey| IF( nKey == VK_F2, Eval( oGet2:bAction ), Nil ) }
oGet2:lAdjustBtn := .t. // Button Get Adjust Witdh oGet3
oGet2:lDisColors := .f. // Deactive disable color
oGet2:nClrTextDis := CLR_WHITE // Color text disable status
oGet2:nClrPaneDis := CLR_BLUE // Color Pane disable status
@ 70,10 get oGet3 var cVar3 bitmap "..\bitmaps\chkyes.bmp" ;
action( TESTE_GET3() ) of oDlg pixel size 120,12
oGet3:cToolTip := OemToAnsi( "<F2> - ACTION con F2 GET 3" )
oGet3:lBtnTransparent := .T. // transparent button
// AQUI:
oGet3:bKeyDown := { |nKey| IF( nKey == VK_F2, Eval( oGet3:bAction ), Nil ) }
oGet3:lAdjustBtn := .t. // Button Get Adjust Witdh oGet3
oGet3:lDisColors := .f. // Deactive disable color
oGet3:nClrTextDis := CLR_WHITE // Color text disable status
oGet3:nClrPaneDis := CLR_BLUE // Color Pane disable status
@ 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.
activate dialog oDlg centered
return nil
FUNCTION TESTE_GET1()
? "ACTION con tecla <F2> en GET1"
RETURN NIL
FUNCTION TESTE_GET2()
? "ACTION con tecla <F2> en GET2"
RETURN NIL
FUNCTION TESTE_GET3()
? "ACTION con tecla <F2> en GET3"
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 105 guests