Hi Andrew,

Here's a modified example of one of Jeff Kreis tables to include check box
functionality:

context [
 ;- The database
 tdata: [
  ["Adamson" "Sarah" 0]
  ["Adamson" "John" 1]
  ["Battey" "Nora" 0]
  ["Roberts" "Julia" 1]
  ["Spencer" "Frank" 1]
 ]

 ;- For the scroll bar
 cnt: 0
 view layout [
  across
  space 0
  tbl: list 220x400 [across space 0 text 100 text 100 check [tmp:
(face/parent-face/offset/y / face/parent-face/size/y) + 1 if tmp <= length?
tdata [tdata/:tmp/3: either tdata/:tmp/3 = 1[0][1]]]]
   supply [
    count: count + cnt
    face/color: ivory
    face/text: none
    if even? count [face/color: ivory - 50.50.50]
    face/data: false
    if none? v: pick tdata count [exit]
    switch/default face/style [
     check [
      face/data: to-logic (pick v index)
     ]
    ][face/text: pick v index]
   ]

   sld: slider 16x400 [
    c: max 0 to-integer (length? tdata) * value
    if c <> cnt [cnt: c show tbl]
   ] return
 ]
]


Regards,

James.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to