Hi,
I have a ListView that is shown in Details mode, and the
Checkboxes property is set to true. My problem is that I
dont want the checkboxes being activated when items in
the ListView are double-clicked. Is this possible?
Thanks!
Bright 4 5359
Bright,
I don't think it is, you will have to code for it yourself. I think it
make sense though, as you need a single click to occur if you are going to
perform a double click.
What you could do is override the WndProc method and handle the
WM_LBUTTONUP message (or WM_LBUTTONDOWN) message. Once you have that, you
can set a timer to fire in the amount of time that a double click would
occur (the threshold). If the double click event fires, then cancel the
timer. If it doesn't, when the timer fires, fire the single click event,
and select the item.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
I have a ListView that is shown in Details mode, and the Checkboxes property is set to true. My problem is that I dont want the checkboxes being activated when items in the ListView are double-clicked. Is this possible?
Thanks!
Bright
Thanks for your reply, Nicholas Paldino. But I have not got it yet. Do you
mind to give me a simple example please?
Bright
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:e0*************@TK2MSFTNGP10.phx.gbl... Bright,
I don't think it is, you will have to code for it yourself. I think
it make sense though, as you need a single click to occur if you are going to perform a double click.
What you could do is override the WndProc method and handle the WM_LBUTTONUP message (or WM_LBUTTONDOWN) message. Once you have that, you can set a timer to fire in the amount of time that a double click would occur (the threshold). If the double click event fires, then cancel the timer. If it doesn't, when the timer fires, fire the single click event, and select the item.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
I have a ListView that is shown in Details mode, and the Checkboxes property is set to true. My problem is that I dont want the checkboxes being activated when items in the ListView are double-clicked. Is this possible?
Thanks!
Bright
Bright,
What do you have? How have you implemented this?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message
news:uw**************@TK2MSFTNGP09.phx.gbl... Thanks for your reply, Nicholas Paldino. But I have not got it yet. Do you mind to give me a simple example please?
Bright
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:e0*************@TK2MSFTNGP10.phx.gbl... Bright,
I don't think it is, you will have to code for it yourself. I think it make sense though, as you need a single click to occur if you are going
to perform a double click.
What you could do is override the WndProc method and handle the WM_LBUTTONUP message (or WM_LBUTTONDOWN) message. Once you have that,
you can set a timer to fire in the amount of time that a double click would occur (the threshold). If the double click event fires, then cancel the timer. If it doesn't, when the timer fires, fire the single click
event, and select the item.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... Hi,
I have a ListView that is shown in Details mode, and the Checkboxes property is set to true. My problem is that I dont want the checkboxes being activated when items in the ListView are double-clicked. Is this possible?
Thanks!
Bright
Hi Nicholas,
I have a ListView that is shown in Details mode. When I doubleclick an item,
I do not want change the checkbox status. Whatever a sample that can block
the itemCheck event will be fine. The thing is I do not know how to capture
the timer to decide a event is a doubleclick or not. Any sample can do this
will be great.
Thanks in ahead.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eQ**************@TK2MSFTNGP12.phx.gbl... Bright,
What do you have? How have you implemented this?
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message news:uw**************@TK2MSFTNGP09.phx.gbl... Thanks for your reply, Nicholas Paldino. But I have not got it yet. Do
you mind to give me a simple example please?
Bright
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:e0*************@TK2MSFTNGP10.phx.gbl... Bright,
I don't think it is, you will have to code for it yourself. I
think it make sense though, as you need a single click to occur if you are
going to perform a double click.
What you could do is override the WndProc method and handle the WM_LBUTTONUP message (or WM_LBUTTONDOWN) message. Once you have that, you can set a timer to fire in the amount of time that a double click
would occur (the threshold). If the double click event fires, then cancel
the timer. If it doesn't, when the timer fires, fire the single click event, and select the item.
Hope this helps.
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"Bright Sun" <su********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl... > Hi, > > I have a ListView that is shown in Details mode, and the > Checkboxes property is set to true. My problem is that I > dont want the checkboxes being activated when items in > the ListView are double-clicked. Is this possible? > > Thanks! > > Bright > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike Ruane-Torr |
last post by:
I have a design problem involving a ListView control on a Windows form.
What it boils down to is the following question:
Q: Is there a way to tell the difference between a ListView.ItemCheck...
|
by: Ray Mitchell |
last post by:
Hello,
I have a standard ListView control with the CheckBox and MultiSelect
properties enabled. I have an ItemCheck event set up so I can do some work
every time an item is checked/unchecked. ...
|
by: Bright Sun |
last post by:
Hi,
I have a ListView that is shown in Details mode, and the Checkboxes property
is set to true. My problem is that I don't want the checkboxes being
activated when items in
the ListView are...
|
by: Boris |
last post by:
I wonder when CheckedListViewItemCollection is updated? Before ItemCheck
event? After the event? How to force CheckedListViewItemCollection to show
updated items list after check in the ItemCheck...
|
by: Richard Myers |
last post by:
Hello
Can anyone tell me what im missing in handling the ItemCheck event of a
winforms listview.
I want the item to be selected if the check box is checked and
not/unhighlighted when it is not.
...
|
by: Peter |
last post by:
Hi,everyone,
I'm using a listview control to deal with data. The ItemCheckEventArgs have
2 properties:CurrentValue and NewValue in listview.itemcheck event. Can
anybody tell me when does the...
|
by: Dred |
last post by:
'ello
I have a listview with checkboxes displaying several options. When one
is checked, all it's mutually exclusive counterparts are removed.
The problem is that if I check an Item, and...
|
by: ian.watkins |
last post by:
I'm having a problem with the listview itemcheck event since upgrading
a smart device app from VS2003 VB.NET CF1.0 to VS2005 VB.NET CF2.0.
I'm using the listview item checkbox to indicate if the...
|
by: sherifffruitfly |
last post by:
Hi,
Here's a skeleton-handler of what I'm trying to do:
private void editBbListView_ItemCheck(object sender,
System.Windows.Forms.ItemCheckEventArgs e)
{
string qEnabled = "";
string...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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...
|
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...
|
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,...
| |