Detecting double-click in a vruby listbox?

Hi,

I had a first look at VRuby and encountered

the following problem.

How can I detect a double-click in a listbox?
Can I define an event on double-click?

require 'vr/vruby’
require “vr/vrcontrol”

frm=VRLocalScreen.newform

def frm.construct
self.caption= “test"
addControl(VRListbox, “lst1”,”",80,200,150,90)
@lst1.setListStrings [“celine”,“valerie”,“catherine”,“doris”,“emily”]
end

def frm.lst1_selchanged
p @lst1.getTextOf(@lst1.selectedIndex)
p "selection changed"
end

def frm.lst1_dblclicked
p "This is what I would want!!"
end

frm.create
frm.show
VRLocalScreen.messageloop
exit

Thanks a lot for your help,

-A.

···

Armin Roehrl, http://www.approximity.com

How can I detect a double-click in a listbox?
Can I define an event on double-click?

Alan Chen was so kind to send me a solution.
Maybe that is interesting to some of you, too.

···

This is my solution. Apparently the default listbox doesn’t map the
doubleclick event. I recently had to implement this, and recalled your
post to ruby-talk.

class MyListbox < VRListbox
def vrinit
super()
addCommandHandler(WMsg::LBN_DBLCLK, ‘dblclicked’,MSGTYPE::ARGNONE,nil)
end
end