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

[REBOL] Simple VID window style

From: atruter::hih::com::au at: 17-Apr-2002 11:52

Some folks may find the following of use . . . (or at least as a basis for something more elegant / complex). <code> REBOL [] stylize/master [ bar-title: text with [ size: 24x24 font: [size: 14 valign: 'middle] feel: make feel [ engage: func [face action event] [ if action = 'down [ face/data: event/offset face/help: face/parent-face/size face/parent-face/size: face/size show face/parent-face ] if event/type = 'move [ face/parent-face/offset: face/parent-face/offset + event/offset - face/data show face/parent-face ] if action = 'up [ face/parent-face/size: face/help show face/parent-face ] ] ] ] bar-close: button 24x24 "X" bold #"^(ESC)" ] display: make object! [ window-title: none window: func [title block /local pos] [ insert block [pad 24 across] insert tail block compose/deep [ pos: at origin 0x20 space 0 at 0x0 window-title: bar-title white navy (title) bold pos/x - 12 bar-close [unview] ] view/options center-face layout block [no-title] ] title: func [text] [window-title/text: text show window-title] ] display/window "Simple VID window style" [ title "Click & drag title bar" return button "Change title" [display/title form now/time/precise] return label "Restrictions:" return text "1. Direction must end as 'across'" return text "2. 'origin' will confuse it" return text "3. Largest (or equal largest) face must be last" ] </code> Regards, Ashley *****************Privacy, Confidentiality & Liability Notice ************ This email is intended for the named recipient only. The information contained in this message may be confidential, or commercially sensitive. If you are not the intended recipient you must not reproduce or distribute any part of this email, disclose its contents to any other party, or take any action in reliance on it. If you have received this email in error, please contact the sender immediately. Please delete this message from your computer. You must scan this email and any attached files for viruses. The company accepts no liability for any loss, damage or consequence, whether caused by our own negligence or not, resulting directly or indirectly from the use of any attached files. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of the Company. **************************************************************************