list: ["a" "b" "c"]
probe collect [
view [
text-list data list on-down [
keep take at face/data face/selected
if empty? face/data [unview]
]
]
]
list: ["a" "b" "c"]
print collect [
view [
text-list data list on-down [
; I need the selected item to
; store it into another text-list
keep take at face/data face/selected
if empty? face/data [unview]
]
]
]
event/picked
rather than face/selected
. Though, the mouse events seem to not fill event/picked
, so that we need to change the event type and add some extra code to ensure that the text-list's selection does not interfere:list: ["a" "b" "c"]
probe collect [
view [
text-list data list
on-change [face/selected: none]
on-select [
keep take at face/data probe event/picked
if empty? face/data [unview]
]
]
]
select
event.
@GiuseppeChillemi @pekr some improvements:
http://i.imgur.com/LZm7Vas.png
Next is keyboard navigation and editing (probably using field
style, I will see).