Reputation:
I'd like to know how to open a new window after clicking a button on current window.
I tried creating a list of objects of gtk.Window()
It gave me indexing error.
Upvotes: 0
Views: 2385
Reputation: 21
Well, I'm just at the beginning of working in pygtk too.
But, if you have other gtk.Window()
in other file you have to do is like this:
btn.connect("clicked", self.onbtn1_clicked) #this is to connect to a function
Then you create a function like:
def onbtn1_clicked(self, widget):
from yourscritp import classgtkwindow
var1 = classgtkwindow()
var1.show()
PS: Sorry for my bad English
Upvotes: 2