+Focus
is a prefix class used to set the keyboard focus on
a specific GUI element. For example, it can be used to put the initial focus
on a specific input field in a search dialog. Examples of this usage can be
found in the demo app supplied with the PicoLisp distribution, in gui.l:
(de choCuSu (Dst)
(diaform '(Dst)
(<grid> "--.-.-."
,"Number" (gui 'nr '(+Var +NumField) '*CuSuNr 10)
,"Name" (gui 'nm '(+Focus +Var +TextField) '*CuSuNm 30)
,"Phone" (gui 'tel '(+Var +TelField) '*CuSuTel 20)
(searchButton '(init> (: home query)))
,"Zip" (gui 'plz '(+Var +TextField) '*CuSuPlz 10)
,"City" (gui 'ort '(+Var +TextField) '*CuSuOrt 30)
,"Mobile" (gui 'mob '(+Var +TelField) '*CuSuMob 20)
(resetButton '(nr nm tel plz ort mob query)) )
.
.
.
In the code above, +Focus
is used to give initial focus to
the "Name" input field.