On the Altme Rebol3 World, Rolf asked the questions :
Any simple way to set a "field", or better series of fields with the same
style, to read-only at runtime?
and later back to writable of course?
Chris Ross-Gill provided the answer:
enable-fields: func [pane][
foreach face pane [if face/style = 'field [face/feel: ctx-text/edit]]
]
disable-fields: func [pane][
unfocus
foreach face pane [if face/style = 'field [face/feel: none]]
]
view lay: layout [
field field field guide
btn "Enable" [enable-fields lay/pane] return
btn "Disable" [disable-fields lay/pane]
]
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.6 - Release Date: 28/12/2004
--
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.