Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Listbox Click

$
0
0

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.
      

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>