Hi, I am learning gtk.assistant and using pygtk too.
At the begining, I have meet the similar question as yours(I did not use
glade)

I think you can make a reference to the gtk-demo, which is in the gtk+
installation tar pacakge(.gtk+-2.18.3/demos/gtk-demo).
Where you can see a three pages assistant and the source code in C.

I transfer this code to python, everything is ok now.

I wish this message can help you.

Daniele Visaggio-2 wrote:
> 
> Hi list,
> 
> I realized an assistant with Glade 3.6.7. The assistant appears
> correctly on the screen but the "Forward" button is not active, so the
> wizard is blocked on the first welcome page.
> 
> With the help of Google I understood that in order to activate the
> button I should use the assistant.set_page_complete() to unblock the
> button and then the set_forward_page_func() to move to the next wizard
> step. But I'm not able to do this in python (i'm still a python
> noob :-( ).
> 
> Btw, I tried to link the the signal on_assistant1_apply (i.e. the event
> that should happen when the final user hits the forward or the apply
> button) to the on_assistant1_apply callback function, which triggers the
> set_forward_page_func() method. Obviously, this doesn't work.
> 
> Until now I wrote this little script:
> 
> ################################################
> #!/usr/bin/python
> #code snippet for a gtkassistant
> 
> import gtk, gtk.glade, pygtk
> 
> pygtk.require("2.0")
> 
> def on_assistant1_destroy(widget, data=None):
>    gtk.main_quit()
> 
> def on_assistant1_cancel(widget, data=None):
>    assistant1.destroy()
> 
> def on_assistant1_apply(widget, data=None):
>    assistant1.set_forward_page_func(page_func=None, data=None)
>    
> 
> gladeFile = gtk.glade.XML("assistant.glade")
> assistant1 = gladeFile.get_widget("assistant1")
> 
> signals = {
>   "on_assistant1_destroy" : on_assistant1_destroy,
>   "on_assistant1_cancel"  : on_assistant1_cancel,
>   "on_assistant1_apply"   : on_assistant1_apply
> }
> 
> gladeFile.signal_autoconnect(signals)
> 
> if assistant1:
>    assistant1.show()
>    gtk.main()
> ################################################
> 
> How can I fix this?
> 
> Thank you in advance, 
> 
> Daniele Visaggio
> 
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
> 
> 

-- 
View this message in context: 
http://old.nabble.com/gtk.assistant-and-python---how-to-go-to-the-next-assistant-page-tp27042875p27293032.html
Sent from the Gtk+ - Python mailing list archive at Nabble.com.

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to