REBOL [ Title: "Demo 15 - List view with navigation functions" Short: "List Navigation" Author: ["Henrik Mikael Kristensen"] Copyright: "2006 - HMK Design" Filename: %demo15.r Version: 0.0.1 Created: 09-Sep-2006 Date: 09-Sep-2006 License: { BSD (www.opensource.org/licenses/bsd-license.php) Use at your own risk. } Purpose: { List View with drag'n'drop row rearrangement. Click and hold to draq a row to rearrange the list entries. } History: [] keywords: [navigation] ] do http://www.hmkdesign.dk/rebol/list-view/list-view.r do-list-pnl: does [ foreach f list-data-pnl/pane [do-face f none] ] view layout [ text bold {List view with navigation functions} text {Use buttons to move the select cursor up or down.} text {Data is resorted on the fly, if sorting is selected.} text {The select cursor remains visible, when sorting.} panel [ across space 4 li: list-view 400x200 with [ data-columns: [a b c] data: [ ["1" "a" "rr"] ["2" "b" "gg"] ["3" "c" "yy"] ["4" "d" "dd"] ["5" "e" "ii"] ["6" "f" "aa"] ["7" "g" "kk"] ["8" "h" "hh"] ["9" "i" "ww"] ["10" "j" "ss"] ["11" "k" "ll"] ["12" "l" "jj"] ] sort-action: [do-list-pnl] ] panel [ space 1 text bold {Navigation Functions} btn 100 "FIRST-CNT" [li/first-cnt do-list-pnl] btn 100 "PREV-PAGE-CNT" [li/prev-page-cnt do-list-pnl] btn 100 "PREV-CNT" [li/prev-cnt do-list-pnl] btn 100 "NEXT-CNT" [li/next-cnt do-list-pnl] btn 100 "NEXT-PAGE-CNT" [li/next-page-cnt do-list-pnl] btn 100 "LAST-CNT" [li/last-cnt do-list-pnl] ] list-data-pnl: panel [ across space 1 text bold {List data} return text bold {SEL-CNT} text 200 [set-face face li/sel-cnt] return text bold {CNT} text 200 [set-face face li/cnt] return text bold {SORT-INDEX} text 200 [set-face face mold li/sort-index] return text bold {HEAD-CNT?} text 200 [set-face face li/head-cnt?] return text bold {TAIL-CNT?} text 200 [set-face face li/tail-cnt?] return ] ] ]