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

[REBOL] Re: text-list

From: gjones05::mail::orion::org at: 22-May-2001 16:52

From: "Ammon Cooke"
> How can I add items to a text-list from > another face?? How do I add Items to > a text-list at all? What I need is to be > able to have a user enter data to fill the > text-list, I also need to be able to load a > plain text file into it.
Hi, Ammon, There are possibly two ways. The way I use is to change the lines path. Example: view layout [ txt "Click items in first list to add to second" tl1: text-list data ["hello" "goodbye" "goodnight"] [ append tl2/lines copy value show tl2 ] tl2: text-list ] the second thing you will eventually need is to be able to adjust the slider. Include this code in your program. Then when adjusting a text-list, use as follows: fix-slider: func [faces [object! block!]] [ foreach list to-block faces [ list/sld/redrag list/lc / max 1 length? head list/lines ] ] view layout [ tl1: text-list data ["apples" "oranges" "bananas" "pears"] button "Transfer" [ append tl2/lines tl1/data fix-slider tl2 show tl2 ] tl2: text-list 150x50 ] Several slider faces can be updated at the same time, if desired. Hope this helps. --Scott Jones