简体   繁体   中英

How to create a pop window using pygtk?

Todo:

On button click in main window, open a popup dialog

Framework:

pygtk

Experience:

Beginner

import gtk

d = gtk.Dialog()
d.add_buttons(gtk.STOCK_YES, 1, gtk.STOCK_NO, 2)

label = gtk.Label('Do you like GTK?')
label.show()
d.vbox.pack_start(label)

answer = d.run()
d.destroy()

print answer

gtk对话框示例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM