View script | License | Download documentation as: HTML or editable | Download script | History |
[0.065] 14.513k
Documentation for: view-list.rUsage document for %view-list.r1. Introduction to %view-list.rview-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 GlanceNo setup is required, just do it. >> do %view-list.r The above image was created running REBOL/View 2.7.5.4.2 GNU/Linux 4.0, KDE Desktop. 3. Using %view-list.rRequires REBOL/View 3.1. Running %view-list.rFrom 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 learnThis 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 styleThis 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] ![]() 5. What can breakNothing 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
|