데이터들은 사전으로 넘기면 될듯 하다. 인스톨러 제작하면서 시도해본다.
---
#!/usr/bin/env python
import pygtk
pygtk.require("2.0")
import gtk
class MultiWindow1:
def btNext(self, widget, data=None):
window2 = MultiWindow2()
self.window1.hide()
def __init__(self):
self.window1 = gtk.Window(gtk.WINDOW_TOPLEVEL)
button = gtk.Button("Next")
button.connect("clicked", self.btNext)
self.window1.add(button)
button.show()
self.window1.connect("destroy", lambda w: gtk.main_quit())
self.window1.show()
class MultiWindow2:
def btPrev(self, widget, data=None):
window2 = MultiWindow1()
self.window.hide()
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
button = gtk.Button("Prev")
button.connect("clicked", self.btPrev)
self.window.add(button)
button.show()
self.window.connect("destroy", lambda w: gtk.main_quit())
self.window.show()
def main():
gtk.main()
return 0
if __name__ == "__main__":
MultiWindow1()
main()
댓글 없음:
댓글 쓰기