Re: Notebooks problem



Omar,

The following gtk_notebook_* api's will help.

gint page_num = 0;
GtkWidget *child_widget = NULL;
gchar  *label_text = NULL;
/* A. get a page number  of current tab */
page_num = gtk_notebook_get_current_page (GtkNotebook *notebook);

/* B. get the page's window handle  */
child_widget  = gtk_notebook_get_nth_page (GtkNotebook *notebook, gint page_num);

/* C. get the text from the label */
label_text = gtk_notebook_get_tab_label_text (GtkNotebook *notebook, GtkWidget *child_widget);

/*  D. or set the text for the tab */
gtk_notebook_set_tab_label_text (GtkNotebook *notebook, GtkWidget *child_widget, gchar *label_text);

Hope this helps, you can find more info here: http://developer.gnome.org/doc/API/2.0/gtk/GtkNotebook.html

james,

----- Original Message ----
From: "omar crea jusan it" <omar crea jusan it>
To: gtk-app-devel-list gnome org
Sent: Wednesday, June 6, 2007 1:08:06 PM
Subject: Notebooks problem

Good evening.
I have a problem with labels inside a notebook. The function
gtk_notebook_append_page() uses a frame and a label as arguments,
and this appending process must be repeated for each tab of the notebook.
I use a for statement to create a notebook with as many tabs as
needed, but actually I giving all the tabs a predefined label
(with progressive numbers).
How can I change the text of a label after it has been created?
Thanks a lot!

Omar Crea

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







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