• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1771
  • Last Modified:

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?
0
mocs
Asked:
mocs
  • 4
  • 4
1 Solution
 
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
 
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
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
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
 
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"

This is your best bet

The listview in VB6 doesnt have a double click event so it uses the above concept
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.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now