Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List box click event fires twice...how to detect
Message
From
30/10/1997 22:22:43
 
 
To
30/10/1997 21:18:35
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00057441
Message ID:
00057528
Views:
28
>>It actually goes down to the original VFP listbox object. Put a listbox on a form and put a wait window
>>in the click event. If you click on the highlighted object, the click event will fire twice.
>
>This is at least weird. I never met this problem and never heard/read about something like that. I just retested now and I have just one click, as it's supposed to be.
>
>Are you sure your mouse works fine? Do you have 2 clicks for other objects too (or is just for the List control)?
>

For the record, I assume Craig is using Version 5. I'm still stuck with 3.0b, but I created a blank form and added 1 list box object. In the init of the form I declared a public variable 'pnClicks' and set it to 0.

In the listbox click event, I put the following code:

*******************
pnClicks = pnClicks + 1

WAIT WINDOW 'Clicks: ' + ALLTRIM(STR(pnClicks)) NOWAIT
*******************

The listbox is set to an array which I fill manually in the form's init event for simplicity. The first time I click on an item in the listbox, I get a window that says 'Clicks: 1'.

Every time I click on the already hilighted item in the list box after that, the wait window count goes up by 2.
ie - Clicks: 3, Clicks: 5 etc.

So, whatever Craig is seeing, I'm seeing too.

Alan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform