Re: about gtknotebook
- From: "Joshua Horvath" <Josh_Horvath-AJH051 email mot com>
 
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
 
- Subject: Re: about gtknotebook
 
- Date: Mon, 16 Oct 2000 09:43:56 -0500
 
The prototype for the "switch_page" signal callback function is this:
void user_function(GtkNotebook *notebook,
                   GtkNotebookPage *page,
                   gint page_num,
                   gpointer user_data);
where page_num gives you the current page.
-Josh
rings wrote:
Hi all:
  I have soem questions about gtknotebook, please help me!
- There are many pages in notebook,if I use these function :
   gtk_notebook_set_tab_pos(notebook,GTK_POS_BOTTOM);
   gtk_notebook_set_scrollable(notebook,TRUE);
  right_arrow and left_arrow will show on the right. Now,I would like to show them on  left.How can I do?
-If I click second page,I use "switch_page" signal and want to get current page's number.My code is these:
        gtk_signal_connect (GTK_OBJECT (notebook), "switch_page",
                GTK_SIGNAL_FUNC(OnSwitchClick_CallBack),NULL);
        void OnSwitchClick_CallBack() {
          g_print("current page is %d\n",gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
        }
when I run my program,I get "current page is -1". why?
thank you
_______________________________________________
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]