Re: [gtk-list] Re: Mouse buttons in callbacks




On Mon, 24 Aug 1998, Robert S. Mallozzi wrote:
> 
> Attaching the "clicked" signal to a button, the callback is 
> never called for mouse buttons 2 and 3, only button 1. (Also,
> a button press event is never sent, only release).  The only way
> I can get all mouse buttons to invoke the callback is by trapping
> "button_press_event", "button_release_event", etc.   This results
> in a lot of code to perform such a simple action.  
> 

"clicked" means the button was activated, not that any mouse button was
clicked. To have "clicked" work with all buttons would be annoying in
cases where you want the left mouse button to activate the GtkButton but
the other buttons to do something else, i.e. in most cases. 

It doesn't seem to me that you're trying to do something simple; why are
you playing with all the release_event and leave_event stuff?  Just
connect to button_press_event, which passes the callback an event
containing the pressed button. If that doesn't work then your action
probably isn't so simple after all. 

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]