comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Counting Clicks in List Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Counting Clicks in List Widgets [message #79243] Wed, 08 February 2012 18:37
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I ran into an interesting little, uh, feature
today. In the Coyote Library there is a small
dialog widget called a List_Selector. It just
allows the user to specify items in a list and
select one or more of them, returning the selected
items to the user.

selectedItems = List_Selector(['cow', 'dog', 'coyote'])

I set this up so that if the user double clicks the list
item, it acts as if the user had clicked the Accept
button. I check for this by looking at event.clicks.
If the number is 2, I do my thing.

Works perfectly on Windows machines. But on LINUX
machines (and possible all UNIX machines, don't know)
it behaves differently. What happens is that if the
user instead of clicking the list item twice, just
physically selects the carriage return key while
the cursor is in the list, the event.clicks field
is set to 2!

I don't know if this is a bug or not. It is
certainly NOT documented anywhere that a CR will
cause a double click. Or even that it will cause
an event!

I'm going to fix the program by just ignoring
the clicks for non-Windows machines, but I'm
curious to know how wide-spread the problem might
be. And, especially, if this is a problem on Macs.

Could someone with a non-Windows machine and the
Coyote Library just try the command above and let
me know what happens if you hit the CR key when
the list is on the display. Thanks!

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Previous Topic: Re: finding cluster boundary
Next Topic: Re: Counting Clicks in List Widgets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:14:51 PDT 2025

Total time taken to generate the page: 0.24528 seconds