Home   Archive   Permalink



Text-list control

view layout [
    b: text-list data ["a" "b" "c"] [alert value]
    key #"^M" [b/action b b/picked]
    key keycode [up] [...]
    key keycode [down] [...]
]
    
1) How to set focus to text-list?
2) How to add cursor key control?
3) Why is "alert" different for clicking and pressing the "Enter" key (with and without the "ok" button)?

posted by:   Sergey_Vl     13-May-2022/8:19:39-7:00



I found this in my list of old tests. It makes a text-list and then sets the "picked" value to item number three in the list. Not sure if this is what you are looking for in question 1. I am retired now so I don't do much programming.
    
R E B O L []
d: ["aaa" "bbb" "ccc" "ddd"]
view layout [
     t: text-list data d
     do [t/picked: copy d/3]
     button "Debug" [halt]
]


posted by:   Steven White     27-May-2022/12:56:19-7:00



Thanks very match. This is what I was looking for!
    
1) do [ b/picked: copy b/data/1 ]
    
2) pos: 2
     ...
     key keycode [down] [
    pos: pos + 1
    b/picked: copy b/data/(pos)
    show b
     ]

posted by:   Sergey_vl     31-May-2022/17:36:18-7:00



Name:


Message:


Type the reverse of this captcha text: "s d r o w"



Home