473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Single click stops double-click working?? Help??

Siv
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.
Nov 21 '05 #1
3 2915
i do exactly what you describe with pretty much all of my listview's, so it
should work. are you using the DoubleClick event? you may also be doing
something wierd inside MyListView_Click that prevents a DoubleClick from
being generated

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
On Error Resume Next
MyButton_Click(sender, e)
End Sub

Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyButton.Click
'do stuff
End Sub

"Siv" wrote:
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.

Nov 21 '05 #2
If you have trouble getting it to work, then try to bubble the event using:

RaiseBubbleEvent(Me, e)
"Dave Cousineau ( Sahuagin )"
<Da*******************@discussions.microsoft.com > skrev i melding
news:C5**********************************@microsof t.com...
i do exactly what you describe with pretty much all of my listview's, so it
should work. are you using the DoubleClick event? you may also be doing
something wierd inside MyListView_Click that prevents a DoubleClick from
being generated

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
On Error Resume Next
MyButton_Click(sender, e)
End Sub

Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyButton.Click
'do stuff
End Sub

"Siv" wrote:
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click
the
listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession
it
is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.


Nov 21 '05 #3
Check that "Handles MyListView.DoubleClick" is attached to the appropriate
function decleration. Some versions of the Visual Studio IDE sometimes
creates event handlers without these "Handles" attached, thus the event will
never be called.

Example of usage:

Private Sub MyListView_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyListView.DoubleClick
MsgBox ("Hello world!")
end sub
"Siv" <ms**********@removeme.sivill.com> skrev i melding
news:up**************@TK2MSFTNGP10.phx.gbl...
Hi,
I have a ListView control in a Windows application, currently single
clicking a customer name in this list, selects the customer and displays
their details in text boxes to the right of the list. The user must then
click a button to select that customer and move off the page to the main
database details. I would like to implement being able to double-click
the listview item and it have the same effect as single clicking and then
pressing the button.

My problem is that I can't get the double-click event to fire, the
single-click always gets in first??

How do I tell the control that if the two clicks are in close succession
it is a double-click not two single clicks??

I thought the system would go with the double-click if the clicks were
within the timeframe specified in the control panel for a double-click??

--
Siv
Martley, Near Worcester, UK.


Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: sinister | last post by:
The examples in the online manual all seem to use double quotes, e.g. at http://us3.php.net/preg_replace Why? (The behavior is different with single quotes, and presumably simpler to...
12
by: Joshua Beall | last post by:
Hi All, I have heard other people say that PHP can parse double quoted strings (e.g., "Hello, World") faster than it can parse single quoted strings (e.g., 'Hello, World'). This seems backwards...
2
by: girish | last post by:
In my XML document, some node attributes data contains both single quot and double quote characters, such as <input msg="Hello "World", What's up"/>. The double quotes are in form of escape...
4
by: Venkat | last post by:
Hi All, I need to copy strings from a single dimensional array to a double dimensional array. Here is my program. #include <stdio.h> #include <stdlib.h>
5
by: Joel | last post by:
Hi, I incorporated a function in my code that whenever I use a string variable in an sql statement if the string contains a single quote it will encase it in double quotes else single quotes. ...
4
by: Greg | last post by:
I keep getting an error when I have a tick mark in a text value that I am searching for in my XPath Query. Example: <Authors> <Author LastName="O'Donnel"> <Author LastName="Smith">...
2
by: John Dann | last post by:
I'm retrieving some columns from a database with numeric values that fall comfortably within the range of the Single type and I'm tempted to use Single for the relevant column type in the retrieved...
7
by: Tor Aadnevik | last post by:
Hi, I have a problem converting values from Single to double. eg. When the Single value 12.19 is converted to double, the result is 12.1899995803833. Anyone know how to avoid this? Regards...
6
by: R.Biloti | last post by:
Hi folks I wrote the naive program to show up the unit roundoff (machine precision) for single and double precision: #include <stdio.h> int main (void) { double x;
4
by: Justin Fancy | last post by:
Hi everyone, I need to replace all instances of a double quote(") with two single quotes('') in a text file. I already have some replacements of strings going on, but I tried this one, but the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.