[REBOL] Re: specifiv position in area
From: rotenca:telvia:it at: 26-Feb-2002 14:02
Hi Brett,
> ;
> ; "Extend" UNFOCUS. Call a function on the face
> ; that is losing focus.
> ;
>
> if not value? 'unfocus-now [
> set 'unfocus-now get 'unfocus
> unfocus: func ["Removes the current key event focus."] [
> if all [
> system/view/focal-face
> in system/view/focal-face 'on-unfocus
> ] [
> system/view/focal-face/on-unfocus system/view/focal-face
> ]
> unfocus-now
> ]
> ]
Only for knowledge, I want to remember that there is an undocumented feature
(which has little to do with yours). It is the 'refocus field of a field/area
face. It is called by the standard tex-edit func, when a tab is hit and the
flags tabbed is high, it can be used to override the standard back-field and
next-field:
tab-char [
if flag-face? face tabbed [
either in face 'refocus [face/refocus event/shift] [
tmp2: either event/shift [back-field face] [next-field
face]
if flag-face? face hide swap-text
action face face/data
focus tmp2
]
exit
]
insert-char face tab
]
---
Ciao
Romano