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. 3 2909
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.
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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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>
|
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.
...
|
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">...
|
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...
|
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...
|
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;
|
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...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |