I want to make a little presentation program that will have a main window and a button, and the button will display other windows by loading them from text files. I can make that work, BUT, I want the windows called by the main window to be offset a bit and not on top of the main window. I have read the documentation for "layout" but I am not able to find a place for the "offset" refinement that makes it work. I wonder if anyone can explain. My latest and most-promising-looking attempt is shown below: Thank you. REBOL [ Title: "A little presentation program" ] ; This test window will eventually be in a text file. TEST-WINDOW: { VH1 "Test heading" text "Test text" } ; A button will load a window from a text file and show it with offset. TEST-BUTTON: does [ view/new layout/offset load TEST-WINDOW 10x50 ] ; This is the main window that will display the windows stored in text files. MAIN-WINDOW: [ button "Test" [TEST-BUTTON] ] ; Start program. view layout MAIN-WINDOW
Offst is a view refinement, and it is relative to the screen, not to the last window: Code: view layout [ button "Click me" [ view/new/offset layout [text "example"] 100x100 ] ]
Try to change 100x100 with other values, if you use negative values, window will be out of the screen, but it will be there...