Need ListBox DoubleClick Event

.NETCF doesn't implement the ListBox.DoubleClick event.  I need it for a project.  Is there any way to simulate it?
mocsAsked:
Who is Participating?
 
Mikal613Connect With a Mentor Commented:
"well then you can use the Selected property if selected = True then it was clicked already. And then you just post your code if selected = true"

This is your best bet

The listview in VB6 doesnt have a double click event so it uses the above concept
0
 
Mikal613Commented:
It didnt really make sense for MS to make that even t because of the stylus.

If you wanna try you can make a timer and let that run (There Is not stop and start so youll have to use the Enabled) and see if the time
short enough between clicks to be a Double CLick
0
 
mocsAuthor Commented:
What I want to do is have the single click select a row and the doubleclick do something with the data.  I found an example of extending the functionality of the button to add a doubleclick event at http://samples.gotdotnet.com/quickstart/CompactFramework/doc/btndclick.aspx.  Using this code, I tried to extend the ListBox without success.  Any ideas?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Mikal613Commented:
well then you can use the Selected property if selected = True then it was clicked already. And then you just post your code if selected = true
0
 
mocsAuthor Commented:
Does CF support ListBox.click event?  How do I find out which ListBox events are supported?  I have the April 04 MSDN library but it doesn't tell me.  
0
 
mocsAuthor Commented:
Yes, that's the same thing I have in my version of the MSDN library.  Some of the items are marked as "Supported by the .NET Compact Framework." but not any of the events.  Intellesense reveals a Click event for the ListBox but it doesn't fire.  
0
 
mocsAuthor Commented:
The only event that seems to fire is SelectedIndexChanged but C# will not let me ovveride that event. argh!
0
 
FordraidersCommented:
mocs,
You may need to explicitly call the object collection first ,.....of the listbox to initiate the Listbox class.
Then use the "OnDoubleClick" event which will call the click event itself.

To find  this in the MSDN..

Filter by the .net compact framework.

Look for :      listbox click event

In the search results
douBLECLICK    "LISTBOX METHODS"

The scroll down and look for   OnDoubleClick  events....method

fordraiders
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.