Aligning buttons in a column in red
I am new to Red / Rebol. I love it so far, I am experimenting with the GUI system.
I am trying to align multiple buttons in a vertical column so to speak.
This is what I still have
Red [ Title: "Editor" needs: 'view]
view [ size 800x600 title "Save Notes"
t: text ""
a: area 500x500 black
button "Click" [t/text: "Red is good !" ] return
text "" button "Close" [quit] return
text "" button "Save" [save %notes.dat a/text t/text "Saved"]
]
This is what it creates, which I wrote about in the annotation with what I am trying to do:
source to share
Welcome to Red!
In the VID dialog, the default direction in which the next item will be placed is horizontal ( across
) by default , so a return
will jump to the next column. If you switch direction to vertical (using below
), the next item will jump to the next row, staying in the same column. This gives you:
Red [ Title: "Editor" needs: 'view]
view [ size 800x600 title "Save Notes"
t: text ""
a: area 500x500 black
below pad 10x0
button "Click" [t/text: "Red is good !" ]
text "hello" button "Close" [quit]
text "world" button "Save" [save %notes.dat a/text t/text "Saved"]
]
Note. I just put text in your empty labels so we can see them in the layout and how they affect button positioning.
Good luck playing with this !; -)
source to share