Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

list vs. text-list

 [1/6] from: dvandenberg:btinternet at: 1-Apr-2003 16:26


I've been trying to get a scrollable list working in View. I'm using List, since it was easier to get the column formatting correct, than in Text-list. Now the problem is I need to make the List vertically scrollable. Is there a way to do this easily? thanks dvdb

 [2/6] from: greggirwin:mindspring at: 1-Apr-2003 17:32


dbc> I've been trying to get a scrollable list working in View. I'm using List, dbc> since it was easier to get the column formatting correct, than in Text-list. dbc> Now the problem is I need to make the dbc> List vertically scrollable. Is there a way to do this easily? Sort of easily. :) Below is an example for you. Let me know if it helps, and watch for wrap. -- Gregg REBOL [ Title: "Scrolling LIST Example" File: %list-scroll-demo.r Author: "Gregg Irwin" ] main-lst: sld: t-1: t-2: t-3: t-4: t-5: c-1: none count: ; The index of the current item being fetched for display. ml-cnt: ; Used to track the result list slider value. visible-rows: ; How many result items are visible at one time. 0 items: make block! 400 repeat i 400 [ append/only items reduce [ i random "ACBD" random 1000 random "AGCT" ] ] lay: layout [ origin 5x5 space 1x0 across style col-hdr text 50 center black mint - 20 col-hdr "C1" col-hdr "C2" col-hdr "C3" col-hdr "C4" return pad -2x0 main-lst: list 207x300 [ across space 1x0 origin 0x0 style cell text 50x20 black mint + 25 center middle c-1: cell cell cell cell ] supply [ count: count + ml-cnt item: pick items count face/text: either item [pick item index][none] ] sld: scroller 16x300 [ if ml-cnt <> (val: to-integer value * subtract length? items visible-rows) [ ml-cnt: val show main-lst ] ] ] visible-rows: to integer! (main-lst/size/y / c-1/size/y) sld/redrag divide visible-rows max 1 length? items sld/step: max .001 divide 1 max 1 length? items sld/page: sld/step * visible-rows view lay

 [3/6] from: dvandenberg::btinternet::com at: 2-Apr-2003 11:23


Thanks Gregg
>From looking at the code, this should be what
I'm looking for. I'm however getting an error: Unknown word or style: scroller the version of view I'm using is 1.2.1.3.1 Are there any dependencies for the word 'scroller' rgds Dvdb

 [4/6] from: greggirwin:mindspring at: 2-Apr-2003 10:22


dbc> I'm however getting an error: dbc> Unknown word or style: scroller Oops! The SCROLLER style was introduced with View 1.2.8. You can either get that, or change SCROLLER to SLIDER and then comment out the references to its STEP and PAGE values. Sorry about that. -- Gregg

 [5/6] from: dvandenberg:btinternet at: 2-Apr-2003 20:16


Thanks Gregg. After some experimenting I came up with the same solution. So in the end you helped me out even more by encouraging me to delve deeper into Rebol/View. rgds dvdb On Wednesday, April 2, 2003, at 06:22 pm, Gregg Irwin wrote:

 [6/6] from: antonr:iinet:au at: 3-Apr-2003 15:43


The earliest version of Rebol/view I have with the scroller style defined is 1.2.5.3.1 Anyway, you need to download a newer beta. We've all been using them and they seem pretty stable. Latest beta is 1.2.8.3.1 I should have also mentioned that in the View a list of data including a checkbox thread. Try here for betas: http://www.reboltech.com/downloads/ Anton.