Notebook - Problem to manualy switch page



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.



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