double-click on text-list
[1/3] from: kgozlin::gis::com::pl at: 4-Dec-2001 14:38
Hi List!
I want to write a simple program with GUI using VID and I have some
question about it :
how to make text-list react on doubleclick?
and how to move items on text-list using drag and drop?
maybe someone did it and source is available? I just don't know where to
start
thanks in advance
Karol
[2/3] from: rotenca:telvia:it at: 4-Dec-2001 15:24
Hi, Carol
You can change this line of code of the engage function of iter face
do :act slf f/text
with something like:
if e/double-click [do :act slf f/text]
I use it in my program on my reb site.
About drag and drop, it is not so easy because faces of text-list are not
static but computed at run time. It is more easy implement drag and drop with
'list style, where faces are static.
---
Ciao
Romano
[3/3] from: jon_saltzman:pitzer at: 5-Dec-2001 14:06
I'm using a normal list, but I imagine it's very similar - I capture the
event and then usually execute some function on a single click:
from: text 160x20 feel [
detect: func [face event] [
if event/type = 'down [
print "You single-clicked me!"
]
]
]
Look up the other mouse events, I think there's a double click one on the
page Ammon sent you.
-Jon