Documention for: view-list.r Created by: btiffin on: 29-May-2007 Format: text/editable Downloaded on: 30-Apr-2025 [h1 Usage document for %view-list.r [contents [numbering-on [h2 Introduction to %view-list.r [p view-list.r is an introduction to the ease of gui creation with REBOL/View and the power of VID's **list** style. [table/att/border="1px"/att/cellpadding="4px" [row [cell **gui** [cell Graphic User Interface, usually pronounced as gooey [row [cell **VID** [cell Visual Interface Dialect [row [cell **style** [cell A high level VID graphical face [row [cell **face** [cell The REBOL term for a graphical element table] [h2 view-list At a Glance [p No setup is required, just **do** it. [asis >> do %view-list.r asis] [p [image http://www.rebol.org/library/arts/accessories/lf019t/view-list.png "view-list.png" [p The above image was created running REBOL/View 2.7.5.4.2 GNU/Linux 4.0, KDE Desktop. [h2 Using %view-list.r [p Requires REBOL/View [h3 Running %view-list.r [p From the library with: [asis/style/font-size:75% >> do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=view-list.r asis] or locally with: [asis >> do %view-list.r asis] [h2 What you can learn [p This script is an introduction to the **view** and **layout** functions of REBOL/View and the **list** style within VID. [br Please see the [link http://rebol.com/docs/view-guide.html "REBOL/View Developer's Guide" [p Both REBOL/Core and REBOL/View are available [br **free of charge** from [link http://www.rebol.com "www.rebol.com" [p REBOL/View gui building is **easy**. [h3 The list style [p 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. [p For more information, please see [link http://rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=list-supply-how-to.r "List Supply" and [link http://rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=list-scroll-demo.r "List Scroll" [p 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. [h3 What you can change. [p 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 [asis list sky 320x200 [across text black 200 text red 100] data names] asis] [image http://www.rebol.org/library/arts/accessories/lf019t/view-list-2.png "view-list-2.png" [h2 What can break [p Nothing to break here. [p Well, REBOL/Core will not have the **view** or **layout** functions defined. You will need to start up REBOL/View. [h2 Credits [table/att/border="1px"/att/cellpadding="4px" [row [cell %view-list.r [cell Author: Unknown [row [cell %list-supply-how-to.r [cell Author: Unknown [row [cell %list-scroll-demo.r [cell Author: Gregg Irwin [row [cell REBOL/Core [cell Carl Sassenrath, REBOL Technologies [row [cell REBOL/View [cell Carl Sassenrath, REBOL Technologies table] [list [li The rebol.org Library Team [li Usage document by Brian Tiffin, Library Team Apprentice, [date list]