[comp.windows.x.motif] Default action

amc@wlv.imsd.contel.com (Allen M. Cohen) (03/12/91)

Can somebody tell me what type of translation or accelerator I can use to
make single clicking mouse button 2 or 3 have the same affect as double-
clicking mouse button 1?  I am using a Multiple Selection List Widget.

I don't like the double click, since if one single clicks two consecutive
items really quickly, it can take that action as a double click on the
first item.  My click interval is 250 milliseconds.
Anyway, I thought that double clicking was invented for Mac-like single
button mice!



<> Allen M. Cohen                  Internet:  amc@wlv.imsd.contel.com       <>
<> 3041 E. Black Hills Ct.         UUCP:      elroy.Jpl.Nasa.Gov!agi0!allen <>
<> Westlake Village, Ca. 91362     Telephone: (805) 498-9611 ext. 195       <>
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>

nazgul@alfalfa.com (Kee Hinckley) (03/12/91)

> Can somebody tell me what type of translation or accelerator I can use to
> make single clicking mouse button 2 or 3 have the same affect as double-
> clicking mouse button 1?  I am using a Multiple Selection List Widget.
Try ListKbdActivate().  I don't know if will work, but it like it ought to.
You might have to also call LIstBeginSelect and ListEndSelect first.

Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

db3l@arnor.UUCP (David Bolen) (03/14/91)

In article <1991Mar12.062359.15814@wlbr.imsd.contel.com> amc@wlv.imsd.contel.com (Allen M. Cohen) writes:

>Can somebody tell me what type of translation or accelerator I can use to
>make single clicking mouse button 2 or 3 have the same affect as double-
>clicking mouse button 1?  I am using a Multiple Selection List Widget.

Here's a small snippet of code I used to do just that.  I also (and users
of my package) found double clicking difficult - especially across the
network, so I just made this a part of any listbox I created.  Now pressing
button 2 (the middle button on my mouse) is the same as a double click.


   /* Declare these variables - change names at will */
   XtTranslations _osUCtlLBTransTable;
   char           _osUCtlLBTranslations[] = "<Btn2Up>: ListElementSelect()"
                                            "          ListElementUnSelect()"
                                            "          ListElementSelect()"
                                            "          ListElementUnSelect()";

   /* Do this once somewhere during initialization */
   _osUCtlLBTransTable = XtParseTranslationTable(_osUCtlLBTranslations);

   /* Then after creating the list widget */
   XtOverrideTranslations(listwidget,_osUCtlLBTransTable);


--
-- David
--
/-----------------------------------------------------------------------\
 \                             David Bolen                             /
  |    Laboratory Automation, IBM Thomas J. Watson Research Center    |
 /              P.O. Box 218, Yorktown Heights, NY  10598              \
| - - - - - - - - - - - -  M i t h r a n d i r  - - - - - - - - - - - - |
| Internet : db3l@ibm.com                    | Bitnet : db3l@yktvmv     |
| Usenet   : uunet!bywater!arnor!larios!db3l | Phone  : (914) 945-1940  |
|   /---------------------------------------------------------------\   |
 \-( All comments/opinions are mine and don't represent those of IBM )-/
    \---------------------------------------------------------------/