Solved

Need ListBox DoubleClick Event

Posted on 2004-04-27
9
1,710 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now