Re: Focus on Notebook tab



Tristan Van Berkom wrote:
sadhees kumar wrote:

Friends,
I am using GtkNotebook widget, it has 7 pages.i want to navigate all the pages.In my project i am using GDK_Tab key for navigating to next page. This is done in the GtkNotebook widget's "keypress" callback function. The problem is i'm not getting the focus in the notebook tab(or page label).Foucus is on the child widget in that page.
 how can i bring the focus to the notebook tab(page label)?
 Thanks in advance...
  code is as follows,

[...]

You dont need any code to keynav through notebook tabs,
GDK_Tab should switch focus from the tab-label to the items
in your notebook page and when the tab-label has focus,
using the left/right arrow keys will navigate through tabs.

I should really read my emails more closely; if you want to
change the notebook page programaticly; you should definitly skip
the keyboard codes and jump straight to notebook api:

http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html

and you can use gtk_widget_grab_focus () to set focus explicitly.

Cheers,
                               -Tristan



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