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

View a list of Data including checkbox

 [1/7] from: jchapde::yahoo::ca at: 31-Mar-2003 20:08


Would it be possible to have in REBOL a list of data with one checkbox per row, where we can check and uncheck directly in the list ? Thanks. Jeannot [jeannot--coginov--com] ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca

 [2/7] from: gchiu:compkarori at: 1-Apr-2003 16:42


On Mon, 31 Mar 2003 20:08:22 -0500 (EST) Jeannot Chapdelaine <[jchapde--yahoo--ca]> wrote:
>Would it be possible to have in REBOL a list of data >with one checkbox per row, where we can check and >uncheck directly in the list ?
I'm not aware of such a beast, and I had the same need recently. In the end I modified text-list so that clicking without control allowed multiple selects .. and gave me the same functionality. Check out Cerebrus' email manager to see what I mean. -- Graham Chiu http://www.compkarori.com/cerebrus

 [3/7] from: rotenca:telvia:it at: 1-Apr-2003 15:32


Hi,
> >Would it be possible to have in REBOL a list of data > >with one checkbox per row, where we can check and > >uncheck directly in the list ? > > I'm not aware of such a beast, and I had the same need > recently.
check-data: reduce [true false true] view layout[ list [ origin 2x2 check [ poke check-data face/user-data value print mold check-data ] ] supply [ face/show?: if count <= length? check-data [ face/data: check-data/:count face/user-data: count true ] ] ] --- Ciao Romano

 [4/7] from: petr:krenzelok:trz:cz at: 1-Apr-2003 15:48


Graham Chiu wrote:
> On Mon, 31 Mar 2003 20:08:22 -0500 (EST) > Jeannot Chapdelaine <[jchapde--yahoo--ca]> wrote:
<<quoted lines omitted: 5>>
> allowed multiple selects .. and gave me the same functionality. > Check out Cerebrus' email manager to see what I mean.
What is the problem with that one? I have it functional here .... first block of list simply accepts sub-VID dialect - it is like panel, which simply encloses another VID styles .... small example, although maybe not easily understandable, as it is mixed with my small util logic ... lst: list 230x350 [ origin 0 space 0x0 across t: text bold black 200x20 [ x: next find vyber-meny t/text either (first x) = "Ano" [change x "Ne"][change x "Ano"] show ch ] ch: check black [] ] supply [ count: count + cnt face/color: ivory face/text: none face/image: none if even? count [face/color: ivory - 50.50.50] p1: pick vyber-meny (count * 2) - 1 p2: pick vyber-meny (count * 2) if none? p1 [exit] ; exit if end of array ... either index = 1 [ face/text: p1 ][ face/data: either p2 = "Ano" [true][false] ] ] Note: as I mentioned in regards to Romano's resize system, styles supporting function code block are real hell for rebol beginner-programmers, because of one simple reason - there are words that you are required to know, if you want to work effectively with the style. 'face is OK here, but 'cnt is a problem .... maybe you will not agree, but 'supply part of list style is a real stopper to style usage, and I have proof with three other ppl I get to some VID coding .... I wonder if there is more intuitive way? -pekr-

 [5/7] from: antonr:iinet:au at: 2-Apr-2003 0:24


Cool Romano! And here it is a version with a scroll bar: check-data: loop 7 [append [] random true] ; random true/false initial data my-offset: 0 view layout [ across my-list: list [ origin 2x2 check [ poke check-data face/user-data value print mold check-data ] ] supply [ face/show?: if count <= (subtract length? check-data my-offset) [ face/data: pick check-data (count + my-offset) face/user-data: (count + my-offset) true ] ] scroller 16x100 [ my-offset: to-integer face/data * (subtract length? check-data 1) show my-list ] ] Anton Rolls.

 [6/7] from: g:santilli:tiscalinet:it at: 1-Apr-2003 17:53


Hi Petr, On Tuesday, April 1, 2003, 3:48:35 PM, you wrote: PK> and I have proof with three other ppl I get to some VID coding .... I PK> wonder if there is more intuitive way? Maybe: supply [face count index] [...] instead of: supply [...] ? Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [7/7] from: antonr:iinet:au at: 2-Apr-2003 13:06


Yes, I think that would be much better. Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted