473,396 Members | 1,990 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,396 software developers and data experts.

False ItemCheck Event?

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. Let's assume I have two items in
the list. The weird part comes when I hold down the control key and select
(not check) the items one at a time. When I select the first one it works
fine. However, when I select the second one it does become selected, as
expected, but it also checks the first item and the ItemCheck event occurs.
By merely holding the control key down and selecting/deselecting various
entries I also can turn the checks on and off in a seemingly random fashion.
Is this a feature? If so, is there a clean way to turn it off?

Thanks,
Ray Mitchell
Ra***************@MeanOldTeacher.com
Nov 15 '05 #1
4 1874

"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:e5*******************@newsread1.news.pas.eart hlink.net...
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. Let's assume I have two items in
the list. The weird part comes when I hold down the control key and select (not check) the items one at a time. When I select the first one it works
fine. However, when I select the second one it does become selected, as
expected, but it also checks the first item and the ItemCheck event occurs. By merely holding the control key down and selecting/deselecting various
entries I also can turn the checks on and off in a seemingly random fashion. Is this a feature? If so, is there a clean way to turn it off?

Thanks,
Ray Mitchell
Ra***************@MeanOldTeacher.com

I also noticed that if I double-click on an item (I also have a double-click
event) the check status toggles and an ItemCheck event occurs. All of this
must be correct behaviour that I just don't quite understand!
Nov 15 '05 #2
Ray,

Have you considered putting into your event logic a reference to the
selectedindex that called the action to determine what action you
would like to take?

~~~~~~~~~~~~~
Tommie Carter
www.premiertechnology.com
--
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message news:<by*******************@newsread1.news.pas.ear thlink.net>...
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:e5*******************@newsread1.news.pas.eart hlink.net...
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. Let's assume I have two items in
the list. The weird part comes when I hold down the control key and

select
(not check) the items one at a time. When I select the first one it works
fine. However, when I select the second one it does become selected, as
expected, but it also checks the first item and the ItemCheck event

occurs.
By merely holding the control key down and selecting/deselecting various
entries I also can turn the checks on and off in a seemingly random

fashion.
Is this a feature? If so, is there a clean way to turn it off?

Thanks,
Ray Mitchell
Ra***************@MeanOldTeacher.com

I also noticed that if I double-click on an item (I also have a double-click
event) the check status toggles and an ItemCheck event occurs. All of this
must be correct behaviour that I just don't quite understand!

Nov 15 '05 #3
That would probably work, but I don't understand why the simple approach I
have taken doesn't work. Should I expect a double-click or a multiple
selection to also cause a check event? It just doesn't make sense.
"Tom Carter" <tc********@hotmail.com> wrote in message
news:a4**************************@posting.google.c om...
Ray,

Have you considered putting into your event logic a reference to the
selectedindex that called the action to determine what action you
would like to take?

~~~~~~~~~~~~~
Tommie Carter
www.premiertechnology.com
--
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message

news:<by*******************@newsread1.news.pas.ear thlink.net>...
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:e5*******************@newsread1.news.pas.eart hlink.net...
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. Let's assume I have two items in the list. The weird part comes when I hold down the control key and

select
(not check) the items one at a time. When I select the first one it works fine. However, when I select the second one it does become selected, as expected, but it also checks the first item and the ItemCheck event

occurs.
By merely holding the control key down and selecting/deselecting various entries I also can turn the checks on and off in a seemingly random

fashion.
Is this a feature? If so, is there a clean way to turn it off?

Thanks,
Ray Mitchell
Ra***************@MeanOldTeacher.com

I also noticed that if I double-click on an item (I also have a double-click event) the check status toggles and an ItemCheck event occurs. All of this must be correct behaviour that I just don't quite understand!

Nov 15 '05 #4
That would probably work, but I don't understand why the simple approach I
have taken doesn't work. Should I expect a double-click or a multiple
selection to also cause a check event? It just doesn't make sense.
"Tom Carter" <tc********@hotmail.com> wrote in message
news:a4**************************@posting.google.c om...
Ray,

Have you considered putting into your event logic a reference to the
selectedindex that called the action to determine what action you
would like to take?

~~~~~~~~~~~~~
Tommie Carter
www.premiertechnology.com
--
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message

news:<by*******************@newsread1.news.pas.ear thlink.net>...
"Ray Mitchell" <Ra*********@MeanOldTeacher.com> wrote in message
news:e5*******************@newsread1.news.pas.eart hlink.net...
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. Let's assume I have two items in the list. The weird part comes when I hold down the control key and

select
(not check) the items one at a time. When I select the first one it works fine. However, when I select the second one it does become selected, as expected, but it also checks the first item and the ItemCheck event

occurs.
By merely holding the control key down and selecting/deselecting various entries I also can turn the checks on and off in a seemingly random

fashion.
Is this a feature? If so, is there a clean way to turn it off?

Thanks,
Ray Mitchell
Ra***************@MeanOldTeacher.com

I also noticed that if I double-click on an item (I also have a double-click event) the check status toggles and an ItemCheck event occurs. All of this must be correct behaviour that I just don't quite understand!

Nov 15 '05 #5

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

Similar topics

2
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...
6
by: Tom | last post by:
Hi, In the following code I have reproduced a problem in IE that is extremely annoying for my application. <html> <head> <script type="text/javascript">
4
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 dont want the checkboxes being activated when items in the ListView are...
3
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...
0
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. ...
0
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...
0
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...
3
by: Jake Barnes | last post by:
On this page I'm given the impression that stopPropagation is a lot like returning false: http://www.brainjar.com/dhtml/events/default3.asp "preventDefault() Can be used to cancel the...
3
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...
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?
1
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...
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.