Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need ListBox DoubleClick Event

Posted on 2004-04-27
9
Medium Priority
?
1,763 Views
Last Modified: 2013-12-27
.NETCF doesn't implement the ListBox.DoubleClick event.  I need it for a project.  Is there any way to simulate it?
0
Comment
Question by:mocs
  • 4
  • 4
9 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10929524
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
 

Author Comment

by:mocs
ID: 10932995
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
 
LVL 48

Expert Comment

by:Mikal613
ID: 10933032
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
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 

Author Comment

by:mocs
ID: 10933154
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
 

Author Comment

by:mocs
ID: 10933299
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
 

Author Comment

by:mocs
ID: 10933392
The only event that seems to fire is SelectedIndexChanged but C# will not let me ovveride that event. argh!
0
 
LVL 48

Accepted Solution

by:
Mikal613 earned 1600 total points
ID: 10938356
"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
 
LVL 3

Expert Comment

by:Fordraiders
ID: 10952655
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question