Re: Notebook - Problem to manualy switch page



i am not using python. but it is mention in the documentation, that
you must call the
gtk_widget_show() to  the child widget before appending to the notebook.

or else, the notebook switch page, or set current page won' work. the
doc do not say why
the only reason mention is "due to historical reason"..

hope it help ;)

On 10/9/08, samuel gallard <samuel gallard gmail com> wrote:
>
> Hi,
> I have a problem with a notebook, I can not switch on a page with the
> set_current_page method.
>
> My notebook has some disabled tabs(sensitive=false). I defined a callback on
> the signal "switch-page" which switch on a specific page if a disabled tab
> is selected. But it does not switch.
>
> Here is my call back (pygtk):
>
> def on_switch(self, notebook, page, page_num, param = None):
>   if(self.club == None and (page_num == 2 or page_num == 3 or page_num ==
> 4)): # condition to swtich on a specific page
>     self.notebook.set_current_page(1)
>
> I printed the page's number, it seems to work but it does not refresh.
> I tried to add a "switch button", it worked. So, in my "on_switch" callback,
> I emited a "clicked" signal for this button. The problem seems to be the
> same : it does not refresh..
>
> In my constructor, I manually switched with the set_current_page(1) method.
> It worked only if I add self.show_all() before (my class is a derived
> window).
>
> I need some helps.
> Regards.
>
> --
> View this message in context:
> http://www.nabble.com/Notebook---Problem-to-manualy-switch-page-tp19895735p19895735.html
> Sent from the Gtk+ - General mailing list archive at Nabble.com.
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>


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