Control where change event does not trigger click event?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list box. Below the list box, I have a "details" view that is pulled
from an array for the selected item. The "details" are essentially True/False
values displayed in checkbox controls.

The issue I'm having is that I only want to write these True/False values to
the array when a mouse click changes that checkbox value. However, when I
select a different item in the list box, it triggers a click event for the
checkbox if the value changes from the last item.

So when the value of the checkbox control changes, a click event is
triggered - not just a change event.

Is there a way I can get the checkbox control to trigger and event when and
only when the value is changed by the mouse? Is there a imilar control that
doesn't confuse the two behaviors?

Thanks in advance for your help.
 
Swordfish said:
I have a list box. Below the list box, I have a "details" view that is pulled
from an array for the selected item. The "details" are essentially True/False
values displayed in checkbox controls.

The issue I'm having is that I only want to write these True/False values to
the array when a mouse click changes that checkbox value. However, when I
select a different item in the list box, it triggers a click event for the
checkbox if the value changes from the last item.

Declare a boolean in the declarations section of your form code, say

Private bListClicked as Boolean

Have your list box change event set bListClicked to True then in the event
handlers for the checkbox(es) either respond or not depending on the value of
bListClicked, but in either case, set it back to False each time.
 
This method worked. Thanks Steve!!


Steve Rindsberg said:
Declare a boolean in the declarations section of your form code, say

Private bListClicked as Boolean

Have your list box change event set bListClicked to True then in the event
handlers for the checkbox(es) either respond or not depending on the value of
bListClicked, but in either case, set it back to False each time.



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
Back
Top