view-list.r is an introduction to the ease of gui creation with REBOL/View and the power of VID's list style.
|gui||Graphic User Interface, usually pronounced as gooey|
|VID||Visual Interface Dialect|
|style||A high level VID graphical face|
|face||The REBOL term for a graphical element|
No setup is required, just do it.
>> do %view-list.r
The above image was created running REBOL/View 184.108.40.206.2 GNU/Linux 4.0, KDE Desktop.
From the library with:
>> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=view-list.ror locally with:
>> do %view-list.r
This script is an introduction to the view and layout functions of REBOL/View and the list style within VID.
Please see the REBOL/View Developer's Guide
Both REBOL/Core and REBOL/View are available
free of charge from www.rebol.com
REBOL/View gui building is easy.
This short example only uses the data feature of the list style. It does no justice to the power of list. It highlights the ease of use but does not show off its real power. The power comes from 'iterated' sub lists and the supply feature of the list style.
For more information, please see List Supply and List Scroll
The data feature of list is still pretty powerful. It accepts a block of graphical control information, for each element in the list. In this example, the list data is a name and a number. The list is created as a blue square 320x200 pixels in size. Inside this blue box, the list style defines a text style for the name, 200 pixels wide and white, and another text style 100 pixels wide in white for the number. Try doing that in any other programming language and 62 characters of source code.
For early experiments with your local copy, try changing some of the colour names. Change the square to sky, the name text to black and the number red, and see how the list changes
list sky 320x200 [across text black 200 text red 100] data names]
Nothing to break here.
Well, REBOL/Core will not have the view or layout functions defined. You will need to start up REBOL/View.
|%list-scroll-demo.r||Author: Gregg Irwin|
|REBOL/Core||Carl Sassenrath, REBOL Technologies|
|REBOL/View||Carl Sassenrath, REBOL Technologies|