LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   GTK Notbook Change Pages How to (https://www.linuxquestions.org/questions/programming-9/gtk-notbook-change-pages-how-to-4175428445/)

VarwigSoftware 09-21-2012 04:17 PM

GTK Notbook Change Pages How to
 
Hello All,

I am trying to write a function to change tabs on a click of a button. My Code is Below. It errors out saying "Gtk-CRITICAL **: gtk_notebook_set_current_page: assertion `GTK_IS_NOTEBOOK (notebook)' failed" I am showing the widget. I know that is in the gnome help.

Any Ideas?
Code:

void btn_login_clicked_cb (GtkButton *btn_login, GtkNotebook *notebook, gpointer user_data)
{
  GtkWidget *login = GTK_WIDGET(btn_login);
  gtk_button_set_label (login, "Please Wait..."); // THIS WORKS :)

  GtkWidget *nb = GTK_WIDGET(notebook);
  gtk_widget_show_all(nb);
  gtk_notebook_set_current_page (nb, 1); // THIS DOES NOT
}

Thank You


All times are GMT -5. The time now is 12:00 AM.