Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] How to protect/unprotect fields in View

From: pwawood::mango::net::my at: 3-Jan-2005 8:28

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] ]