Script Library: 1219 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

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.

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

2. view-list At a Glance

No setup is required, just do it.

>> do %view-list.r
 

view-list.png

The above image was created running REBOL/View 2.7.5.4.2 GNU/Linux 4.0, KDE Desktop.

3. Using %view-list.r

Requires REBOL/View

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.r
 
or 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.
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.

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.

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.

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]
 
view-list-2.png

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.

6. Credits

%view-list.r Author: Unknown
%list-supply-how-to.r Author: Unknown
%list-scroll-demo.r Author: Gregg Irwin
REBOL/Core Carl Sassenrath, REBOL Technologies
REBOL/View Carl Sassenrath, REBOL Technologies
  • The rebol.org Library Team
  • Usage document by Brian Tiffin, Library Team Apprentice, Last updated: 29-May-2007