Hello
partially works
But I would have to put an extra control
it would be interesting something in the GET for example.
Here's the tip for the next Fivewin updates
INFORMAISVRB wrote:Hello
partially works
But I would have to put an extra control
it would be interesting something in the GET for example.
Here's the tip for the next Fivewin updates
// \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
This means that the software should keep track of who, what, where, how, and when the user is doing things, so that situation can be modified, rectified, or just plain understood at some later date. This is much more human than merely forcing the data into some arbitrary format whose correctness is judged mostly on its compliance to a file schema rather than to a human need.
// -------- DRAW TRIANGLE --------------------------------
STATIC FUNCTION TriangleDraw( oGet, hDC, nLONG, nHIGHT, nPEN, nCOLOR )
LOCAL hPen, hOldPen
Local nLeft:= 0
#Define CHAPUCITO_ 2 // para cuando el pen es de tamaño de mas de 2
Local nBottom:= oGet:nHeight- 1 + CHAPUCITO_
Local nLon:= 10 // Resolution dependency missing
Local nAlto:= nLon,;
nAncho:= nLon
#Define SEP_ 0 //If(!lFlatEstilo(), 0, 2)
Local nLeftIni:= nLeft+ SEP_+ 1 ,;
nBottomIni:= nBottom- SEP_- 3
/*
(2)
| \
| \(5)
| \(4)
| \
| \
|______\
(1) (3)
*/
Local hPen1, hBrus1, hOldBrush,;
vSolid
Local nColorNuevo:= CLR_BLUE
vsolid:= {;
{nLeftIni, nBottomIni },;
{nLeftIni, nBottomIni- nAlto },;
{nLeftIni+ nAncho, nBottomIni} ;
}
IF .t. //lFlatEstilo()
nColorNuevo:= LightColor(50, CLR_RED)
ENDIF
hPen1 := CreatePen( 0 , 1, nColorNuevo )
hBrush1 := CreateSolidBrush( nColorNuevo )
*
hOldBrush := SelectObject( hDC, hBrush1 )
hOldPen := SelectObject( hDC, hPen1 )
polypolygon( hDC, vsolid )
DeleteObject(hBrush1)
DeleteObject(hPen1)
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 59 guests