Re: Focus in GTK+

Flavio Alberto Lopes Soares wrote:
> I'm developing an aplication that does not uses mouse with C in GTK+,
> and I need to turn off the focus for objects in my Window, only catching
> keyboards events.
I've had yhe same problem. You can catch the key_press_event and handle
it yourself.
Beware of the auto-repeat function of some keyboards.

> All works, only this focus that I don't know how to eliminate.
> How to do this ?
Handle the proper keystrokes in your own handler (usually TAB and
If the user clicks on another widget with the mouse, the focus moves. I
don't know if this could be "dangerous" for your app. If it is, then you
have to use focus_[in|out] events and give back the focus (with
gtk_widget_focus_grab) to the "correct" widget).


Do You Yahoo!?
Get your free address at

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