This might also help. I had to have a larger input screen for numbers in my application.
The code below allows the user to click a number then the focus automatically switches to the next get.
Code: Select all
Function SixBorg(nRecordNum)
LOCAL nBorg1:=0, nBorg2:=0, oBORG, oSayBorg, cBorgTitle, aBorgItems:={}, oCbx
LOCAL cBorg1:="", cBorg2:="", oGet1, oGet2, nGetFocus
Define Dialog oBORG from 5,2 to 20,26 Title "Enter BORG" STYLE nStyle
@ 0.5,2 say oSayBorg PROMPT "Dyspnea" of oBorg COLOR RGB(0,0,0),RGB(255,255,255) SIZE 25,10
@ 0.5,9 say oSayBorg PROMPT "Fatigue" of oBorg COLOR RGB(0,0,0),RGB(255,255,255) SIZE 25,10
@ 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() )
@ 3.9,1 BUTTON oBtn PROMPT "3" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=3,oGet2:Setfocus()),(nBorg2:=3,oGet1:SetFocus())),oBorg:Update() )
@ 3.9,5 BUTTON oBtn PROMPT "4" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=4,oGet2:Setfocus()),(nBorg2:=4,oGet1:SetFocus())),oBorg:Update() )
@ 3.9,9 BUTTON oBtn PROMPT "5" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=5,oGet2:Setfocus()),(nBorg2:=5,oGet1:SetFocus())),oBorg:Update() )
@ 3.9,13 BUTTON oBtn PROMPT "6" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=6,oGet2:Setfocus()),(nBorg2:=6,oGet1:SetFocus())),oBorg:Update() )
@ 4.9,1 BUTTON oBtn PROMPT "7" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=7,oGet2:Setfocus()),(nBorg2:=7,oGet1:SetFocus())),oBorg:Update() )
@ 4.9,5 BUTTON oBtn PROMPT "8" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=8,oGet2:Setfocus()),(nBorg2:=8,oGet1:SetFocus())),oBorg:Update() )
@ 4.9,9 BUTTON oBtn PROMPT "9" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=9,oGet2:Setfocus()),(nBorg2:=9,oGet1:SetFocus())),oBorg:Update() )
@ 4.9,13 BUTTON oBtn PROMPT "10" SIZE 15,15 Action ( iif(nGetFocus=1,(nBorg1:=10,oGet2:Setfocus()),(nBorg2:=10,oGet1:SetFocus())),oBorg:Update() )
@ 2,6 BUTTON oBtnBorgOK PROMPT "OK" SIZE 25,15 of oBORG ACTION (UpdateSixBORG(nRecordNum, nBorg1, nBorg2),oBORG:End())
oBORG:Center()
Activate Dialog oBORG NOMODAL
Return Nil