rebol []
view [
f: field ""
button "focus" on-action [
focus f
]
when [load] on-action [focus f]
]
使用focus
按钮可以正确设置焦点,但我希望在面板出现时设置焦点。我本以为load
触发器应该这样做,但事实并非如此。
要使用的正确触发器是"回车触发器">
when [enter] on-action [focus f]