focus behavior



Hi,

I'm having problems with focus with my custom container. In my
init_class function I do:

  widget_class->focus = gtk_grid_focus;

To override the widget focus implementation.

Let's say I have a window with several widgets like, for example, this
layout:

+-------+
| entry |
+-------+
| entry |
+-------+
| grid  |
+-------+
| entry |
+-------+

where there is an VBox and three entries and a grid (my custom
container).

As soon as the window is shown my gtk_grid_focus is called and I guess
it should't be happening. I guess only when the focus is in the second
entry and the user press the tab (or down arrow) key that function
should be called. Is this correct?

Otherwise, If I do a gtk_widget_grab_focus() as soon as I get the
gtk_grid_focus called the initial focus is set to the Grid when the
window is shown and this is not what is expected.

Any clue?

Lorenzo





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