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

[REBOL] face/parent-face and top-most window?

From: petr:krenzelok:trz:cz at: 11-Jan-2004 20:38

Hi, some time ago I created following functions for disabling-enabling certain elements. It worked well with Cyphre's styles, as I put many ui elements into group-box. But when I don't use group-box (by default rebol does not have it available), I wanted to somehow put disabling face into system/view/screen-face/pane, but it does not seem to work. disabled-face?: func [f][flag-face? f 'disabled] enabled-face?: func [f][not disabled-face? f] disable-face: func [f /fx effect-block][ if not disabled-face? f [ insert skip find f/parent-face/pane f 1 make face [ offset: f/offset size: f/size edge: none either fx [effect: effect-block][effect: [merge gradmul 1x1 ]] feel: make feel [engage: does []] ] flag-face f 'disabled show f/parent-face ] ] enable-face: func [f][ if disabled-face? f [ remove skip find f/parent-face/pane f 1 deflag-face f 'disabled show f/parent-face ] ] e.g. try following code: view screen: layout [bt: button "OK" [disable-face bt]] and now: view screen: layout [bt: button "OK" [disable-face screen]] I thought that 'screen here is simply being put into system/view/screen-face/pane, but screen-face/parent-face is not set, nor can I find 'screen in system/view/screen-face/pane. could anyone explain, please? thanks, -pekr-