Are there any example of determining the difference between a click and a double click on a listbox? Have searched and can not find much.
Page 1 / 1
Are there any example of determining the difference between a click and a double click on a listbox? Have searched and can not find much.
There are two different event handlers for a Click or DoubleClick events that you can check individually.
If you are trying to select an item when only the double-click is used then you can use something like the following using the MouseDoubleClick event:
method-id listBox1_MouseDoubleClick final private.
procedure division using by value sender as object e as type System.Windows.Forms.MouseEventArgs.
declare i as binary-long = self::listBox1::IndexFromPoint(e::Location)
if i not = type System.Windows.Forms.ListBox::NoMatches
set textBox1::Text to Listbox1::SelectedItem
end-if
end method.
Are there any example of determining the difference between a click and a double click on a listbox? Have searched and can not find much.
Thanks, that worked great!
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.