[comp.windows.x.motif] Using Btn2 for List Default-action

glp@ibism.UUCP (Greg Parkinson) (05/07/91)

I'm trying to figure out how to define a press of the 
middle mouse button to have exactly the same effect 
as a double-click with button 1.

I was playing around and defined a translation for 
<Btn1Up>,<Btn1Down> : ListElementSelect()
just to try it, and it made the middle button work
as a single select, but it removed the button 1
selection action.  Is it not possible to have
a function bound to more than one action?

Additionally, I don't know what function to call to 
get the same action as the double-click - mark the
item and call the callback.

Anyone got any advice?

Thanks
Greg



-- 
Greg Parkinson (GregBear)    Phone:  212-657-7814
Citibank                     Fax:    212-825-8607
111 Wall Street              E-Mail: uunet!ibism!glp
New York, NY  10043
The opinions expressed are my own and not those of the big 'ol bank.

glp@ibism.UUCP (Greg Parkinson) (05/10/91)

In article <12404@ibism.uucp>, glp@ibism.UUCP (Greg Parkinson) writes:
|> I'm trying to figure out how to define a press of the 
|> middle mouse button to have exactly the same effect 
|> as a double-click with button 1.
|> 
|> I was playing around and defined a translation for 
|> <Btn1Up>,<Btn1Down> : ListElementSelect()
|> just to try it, and it made the middle button work
|> as a single select, but it removed the button 1
|> selection action.  Is it not possible to have
|> a function bound to more than one action?
|> 
|> Additionally, I don't know what function to call to 
|> get the same action as the double-click - mark the
|> item and call the callback.
|> 

I've gotten a little farther - I define a translation
on my list widget that looks like:

#augment
<Btn2Down> : ListElementSelect()
<Btn2Up> : Doit()

This highlights my selection and calls Doit, but
when I try to get selectedItemCount, it returns
0!  

I am using Motif 1.0, and looking at the documentation
I realize that 1.1 has *lots* of enhancements for
doing this, but I don't have the option (yet) of
using 1.1.

-- 
Greg Parkinson (GregBear)    Phone:  212-657-7814
Citibank                     Fax:    212-825-8607
111 Wall Street              E-Mail: uunet!ibism!glp
New York, NY  10043
The opinions expressed are my own and not those of the big 'ol bank.