Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > DSS Supplement > Venapps > Command Descriptions > SPECIAL

SPECIAL>SETFOCUS|number

Scroll Prev Top Next More

Sets the focus the control with the number given.  Number is the control number where 1 is the first control that appears, 2 the second and so on.  This can be useful in validating use input.  E.g.,

:SCREEN BOBTEST

MODVAR,"Var 1",50,50,20,10,

BUTTON,"OK",20,90,0,0,C,,SPECIAL>SETFOCUS|1&IFTHENELSE&TEST>TVar 1=0&\

BRANCH>OK&SPECIAL>STOP|Var 1 must be even integer!

BRANCH,"OK",0,0,0,0,,,,OTHERSCR

(where Tvar 1 = INITIAL(MODULO(Var 1,2)) ~ ~ | ).