Hi,
Lets say I have 2 gets in a dialog and one button.
If the user clicks the button I would like the number 5 inserted to which ever get has the flashing cursor in it.
Can this be done?
@ 40 , 10 GET oGet[1] VAR aVarGet[1] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=1,.t.)
@ 80 , 10 GET oGet[2] VAR aVarGet[2] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=2,.t.)
@ 120 , 10 GET oGet[3] VAR aVarGet[3] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=3,.t.)
@ 160 , 10 GET oGet[4] VAR aVarGet[4] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=4,.t.)
@ 200 , 10 GET oGet[5] VAR aVarGet[5] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=5,.t.)
@ 240 , 10 GET oGet[6] VAR aVarGet[6] of oDlg PIXEL SIZE 80,12 font FntdISPLAY VALID (nGetFocus :=6,.t.)
@ 40, YZHGTASTE SBUTTON oBtn1 PROMPT "1" OF oDlg ACTION ( aVarGet[nGetFocus] := aVarGet[nGetFocus] + "1",;
nRest := nRechungsbetrag - VAL(aVarGet[1]) - VAL(aVarGet[2]) - VAL(aVarGet[3]) - VAL(aVarGet[4]) - VAL(aVarGet[5]) + VAL(aVarGet[6]) ,;
oGet[nGetFocus]:refresh(), oGet[nGetFocus]:SetPos( len(oGet[nGetFocus]) ),;
oRest:refresh(), oGet[nGetFocus]:SetFocus() ) PIXEL SIZE 38, 38 FONT oFntBrowser COLORS CLR_WHITE,RGB(44,72,93) , CLR_WHITE CRYSTAL
@ 40, YZHGTASTE+40 SBUTTON oBtn2 PROMPT "2" OF oDlg ACTION ( aVarGet[nGetFocus]:=aVarGet[nGetFocus] + "2",;
nRest := nRechungsbetrag - VAL(aVarGet[1]) - VAL(aVarGet[2]) - VAL(aVarGet[3]) - VAL(aVarGet[4]) - VAL(aVarGet[5]) + VAL(aVarGet[6]) ,;
oGet[nGetFocus]:refresh(), oGet[nGetFocus]:SetPos( len(oGet[nGetFocus]) ),;
oRest:refresh(), oGet[nGetFocus]:SetFocus() ) PIXEL SIZE 38, 38 FONT oFntBrowser COLORS CLR_WHITE,RGB(44,72,93) , CLR_WHITE CRYSTAL
@ 40, YZHGTASTE+80 SBUTTON oBtn3 PROMPT "3" OF oDlg ACTION ( aVarGet[nGetFocus]:=aVarGet[nGetFocus]+"3",;
nRest := nRechungsbetrag - VAL(aVarGet[1]) - VAL(aVarGet[2]) - VAL(aVarGet[3]) - VAL(aVarGet[4]) - VAL(aVarGet[5]) + VAL(aVarGet[6]) ,;
oGet[nGetFocus]:refresh(), oGet[nGetFocus]:SetPos( len(oGet[nGetFocus]) ),;
oRest:refresh(), oGet[nGetFocus]:SetFocus() ) PIXEL SIZE 38, 38 FONT oFntBrowser COLORS CLR_WHITE,RGB(44,72,93) , CLR_WHITE CRYSTAL
@ 1.5,2 Get oGet1 var nBORG1 of oBORG SIZE 20,10 PICTURE "99.9" UPDATE VALID (nGetFocus :=1,.t.)
@ 1.5,7 Get oGet2 var nBORG2 of oBORG SIZE 20,10 PICTURE "99.9" UPDATE VALID (nGetFocus :=2,.t.)
@ 3,1 BUTTON oBtn PROMPT "0" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=0,oGet2:Setfocus()),(nBorg2:=0,oGet1:SetFocus())),oBorg:Update() )
@ 3,5 BUTTON oBtn PROMPT "0.5" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=0.5,oGet2:Setfocus()),(nBorg2:=0.5,oGet1:SetFocus())),oBorg:Update() )
@ 3,9 BUTTON oBtn PROMPT "1" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=1,oGet2:Setfocus()),(nBorg2:=1,oGet1:SetFocus())),oBorg:Update() )
@ 3,13 BUTTON oBtn PROMPT "2" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=2,oGet2:Setfocus()),(nBorg2:=2,oGet1:SetFocus())),oBorg:Update() )
Return to FiveWin for Pocket PC
Users browsing this forum: No registered users and 22 guests