[REBOL] Re: Inform broken? work-around
From: anton:lexicon at: 14-Apr-2002 21:06
You could also append a transparent box to
the pane of the layout you want to lock.
Gabriele, I think, mentioned this technique
first.
append lay/pane make get-style 'box [
offset: 0x0
size: lay/size
effect: [luma -20] ; optionally darken the display
edge: none
]
show lay
Then later, to unlock:
remove back tail lay/pane
show lay
In both of these techniques, the window can still be closed
by pressing the close button, so you will need to catch
the event by modifying lay/feel, like this:
view/new lay ; must be done first (view changes feel)
lay/feel: make lay/feel [
detect: func [face event][
;probe event/type ; see what's going on
if all [event/type = 'close window-locked?][return none]
either all [
event/type = 'key
face: find-key-face face event/key
][
if get in face 'action [do-face face event/key]
none
][
event
]
]
]
wait none ; start waiting for events
Where you set window-locked? to true or false
at the appropriate moment.
Anton.