Re: GtkButton problem



Hi,

Paul Davis <pbd Op Net> writes:

> it should be pretty simple to try. i've run into several problems
> trying to do certain things from a button_press_event, even though
> that seemed like the logical place to do them.

the logical and correct way to deal with buttons is to connect to the 
"clicked" signal. Do not touch "pressed" or "released" unless you 
know what you are doing. One advantage of "clicked" is that it only
gets emitted if the user really clicked the button, that is she
released the button with the mouse still inside the button. This is
good style since moving the mouse out of a button while it is being
pressed and releasing there should be handled as cancelling the 
action and should not be handled as a button_click. If you connect
to "pressed" or "released" you will get this wrong.


Salut, Sven






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