-
Notifications
You must be signed in to change notification settings - Fork 3
VID User Guide
Christopher Ross-Gill edited this page Aug 1, 2016
·
1 revision
Copyright 2007 Rebol Technologies | ||||||||||||||||||||||||||||||||||||||||||||||
view [text "Hello World"]and you will have a graphical window of Rebol VID announcing itself to the world. You'll have to close the window using the system menu that comes with your windowing system, usually an × in the very top left or top right corner. So let's fix that, and add our own close button. view [ text "Hello World" button "Goodbye" [unview none] ]Press the goodbye button and the window will go away. So what is going on?
view [progress slider attach]While of no real use beyond demonstration; that short three word VID input block creates a functional window. You end up with a progress meter that is attached to a slider. Move the slider right and left, and the progress bar will fill in, to match where the slider is. And yet, it still needs a close button. view [ progress slider attach button "Goodbye" [unview none] ]The Goodbye button is fairly easy code to type, somewhat easy to remember, but there may be a better way. VID allows for certain customizations that enable consistent look and feel within and across applications. VID allows for the development of new styles. New styles can be
stylize [ goodbye: button [ [ on-init: override :on-init [ super face spec spec/text: copy "Goodbye" spec/action: [unview none] ] ] [] ] ] |
|
|||||||||||||||||||||||||||||||||||||||||||||
VID offers a lot. There are many styles and each have a variety of options. Options are applied to styles using the options keyword and a block! holding the option specification. For example
button "Quit" options [rounding: 10 material: 'sand]Would build a button in the layout with more rounded corners than the default, and a white beach sand look.
|