|View script||License||Download documentation as: HTML or editable||Download script||History|
Script Library: 1219 scripts
Documentation for: view-list.r
Usage document for %view-list.r
1. Introduction to %view-list.r
view-list.r is an introduction to the ease of gui creation with REBOL/View and the power of VID's list style.
2. view-list At a Glance
No setup is required, just do it.
>> do %view-list.r
The above image was created running REBOL/View 220.127.116.11.2 GNU/Linux 4.0, KDE Desktop.
3. Using %view-list.r
3.1. Running %view-list.r
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
4. What you can learn
This script is an introduction to the view and layout functions of REBOL/View and the list style within VID.
Both REBOL/Core and REBOL/View are available
REBOL/View gui building is easy.
4.1. The list style
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.
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.
4.2. What you can change.
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]
5. What can break
Nothing to break here.
Well, REBOL/Core will not have the view or layout functions defined. You will need to start up REBOL/View.