Solved

Need ListBox DoubleClick Event

Posted on 2004-04-27
9
1,735 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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
 
LVL 48

Expert Comment

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

752 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