Gale FORd wrote:Here is a version using cargo
- Code: Select all Expand view
#Include "FiveWin.Ch"
Function Main()
Local oDlg
Local oGet1,oGet2,oGet3
local cVar1 := space(10)
local cVar2 := space(10)
local cVar3 := space(10)
//SET KEY VK_F5 TO Man_Vei( )
SetKey( VK_F5, {|p, l, v| Man_Vei( oDlg )} )
DEFINE DIALOG oDlg FROM 0,0 to 200,200 PIXEL
@ 15,15 GET oGet1 VAR cVar1 OF oDlg SIZE 50,12 PIXEL
oGet1:cargo := 'XXXXX'
@ 30,15 GET oGet2 VAR cVar2 OF oDlg SIZE 50,12 PIXEL
oGet2:cargo := 'YYYYY'
@ 45,15 GET oGet3 VAR cVar3 OF oDlg SIZE 50,12 PIXEL
ACTIVATE DIALOG oDlg
RETURN NIL
// ----------------------
static function Man_Vei( oDlg )
local nCounter, cVarRet
for nCounter := 1 TO LEN( oDlg:aControls )
if oDlg:aControls[ nCounter ]:lFocused
cVarRet := oDlg:aControls[ nCounter ]:cargo
exit
endif
next
if cVarRet != nil
msginfo( cVarRet )
endif
return cRetVar
Thanks Gale FORd!