Rebol 程式設計/focus
外觀
FOCUS face /no-show
將關鍵事件集中在特定介面上。
FOCUS 是一個函式值。
- face -- (型別: 任何)
- /no-show
focus: func [
"Focuses key events on a specific face."
face
/no-show
/local tmp-face
][
unfocus
if not face [exit]
focal-face: face
if not string? face/text [
face/text: either face/text [form face/text] [copy ""]
face/line-list: none
]
if not caret [caret: tail face/text]
if none? face/line-list [
if face/para [face/para/scroll: 0x0]
caret: tail face/text
]
if flag-face? face field [hilight-all face]
if not no-show [show face]
]