Discussion:
Listview checkboxes cause multiple events on init
(too old to reply)
Rob
2010-03-16 22:56:11 UTC
Permalink
When a listview is configured with checkboxes, it seems that the init
process itself causes triggering of the checkbox events. This happens
asynchronously to the code that sets up the listbox and items, so it's
tough to detect when the events are triggered by 'legitimate'
mouse-clicks vs by the init process. Is there any way to suppress
that? (I'm not even sure why that occurs)
KyleFoster
2010-03-27 23:43:47 UTC
Permalink
Post by Rob
When a listview is configured with checkboxes, it seems that the init
process itself causes triggering of the checkbox events. This happens
asynchronously to the code that sets up the listbox and items, so it's
tough to detect when the events are triggered by 'legitimate'
mouse-clicks vs by the init process. Is there any way to suppress
that? (I'm not even sure why that occurs)
I use a Processing flag (Boolean) that is global to the form. Set it to true
at the first of the create and then set it to False once everything is
created. In the event(s) for the checkbox(s) use

if (Processing)
return;
--
Kyle Foster
President/Senior Software Engineer
FosTech Solutions, Inc
(918) 465-9900
Loading...