Focus on Notebook tab
- From: sadhees kumar <sadheeskumar gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Focus on Notebook tab
- Date: Fri, 9 Sep 2005 16:29:04 +0530
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,
gboolean on_notebook1_key_press_event (GtkWidget *widget, GdkEventKey
*event, gpointer user_data)
{
int a;
if(event->keyval == GDK_Tab)
{
a = gtk_notebook_get_current_page((GtkNotebook *)notebook1);
if (a < 6)
gtk_notebook_next_page((GtkNotebook *)notebook1);
else if (a == 6)
gtk_notebook_set_current_page((GtkNotebook *)notebook1,0);
}
if(event->keyval == GDK_Left)
{
a = gtk_notebook_get_current_page((GtkNotebook *)notebook1);
if (a > 0)
gtk_notebook_prev_page((GtkNotebook *)notebook1);
else if (a == 0)
gtk_notebook_set_current_page((GtkNotebook *)notebook1,6);
}
return FALSE;
}
Regards,
K.Sadheeskumar
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]