PC Review


Reply
Thread Tools Rate Thread

Control where change event does not trigger click event?

 
 
=?Utf-8?B?c3dvcmRmaXNo?=
Guest
Posts: n/a
 
      14th Jul 2006
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.

 
Reply With Quote
 
 
 
 
Steve Rindsberg
Guest
Posts: n/a
 
      15th Jul 2006


In article <E0DE9B76-DCEF-4579-B095-(E-Mail Removed)>, Swordfish
wrote:
> 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.


>
> 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.
>


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


 
Reply With Quote
 
=?Utf-8?B?c3dvcmRmaXNo?=
Guest
Posts: n/a
 
      17th Jul 2006
This method worked. Thanks Steve!!


"Steve Rindsberg" wrote:

>
>
> In article <E0DE9B76-DCEF-4579-B095-(E-Mail Removed)>, Swordfish
> wrote:
> > 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.
>
>
> >
> > 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.
> >

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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink click event trigger using Aspxdatagridview control Kiran Mahale Microsoft C# .NET 0 19th Dec 2007 05:14 PM
How to trigger a Click event on Login Control kokoe25 Microsoft ASP .NET 1 1st Oct 2007 04:49 AM
Trigger click event on a different form =?Utf-8?B?a2FiYWth?= Microsoft Access 1 1st Feb 2006 08:17 PM
Control Exit event kills Button Click Event in Access2002 Forms =?Utf-8?B?TWlrZSBFbGxpb3R0?= Microsoft Access Form Coding 4 20th Oct 2004 05:08 PM
Can i trigger the click button event myself? Alex Microsoft Access VBA Modules 1 11th Aug 2004 01:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:30 AM.