Re: switch_page problem with notebook?



On Wed, Feb 21, 2001 at 10:23:45AM +0100 id072647 belgacom be wrote:


      Hi friends,
      
      When a tab (page) is changed in a notebook ("switch_page" signal), I
receive the pagenumber with gtk_notebook_get_current_page (), but it seems
that the number given is never the same for the same page.    
      Did you met the same problem?

      So without it, I cannot try gtk_notebook_get_nth_page to obtain a
"right" pointer to the page...

      Could you help me?

      Thanks in advance.

Hello!

the switch page signal handler has got the following format:
on_notebook_switch_page (GtkNotebook     *notebook,
                         GtkNotebookPage *page,
                         gint             page_num,
                         gpointer         user_data);

where page_num is the number of the page switching to.
gtk_notebook_get_current_page() also gets the _current_ page, but the
current page when handling this signal is the _old_ page as the signal
handler is called before setting up the new page.

I guess another solution would be (i never tried this, so i might be wrong):
Use your old signal function with gtk_notebook_get_current_page() and
connect this handler with gtk_signal_connect_after() instead of
gtk_signal_connect();






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