Text-list control

Started by Sergey_Vl on 13-May-2022/8:19:39-7:00
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)?
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] ]
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 ]

Reply