PromptDialog.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:MPV-VJ2 作者: paulguy 项目源码 文件源码
def __init__(self, lastWindow, message, value=""):
        Gtk.Dialog.__init__(self, title="Prompt")

        self.set_modal(True)
        self.set_transient_for(lastWindow)

        self.label = Gtk.Label(message)
        self.entry = Gtk.Entry()
        self.entry.set_text(value)
        self.get_content_area().pack_start(self.label, True, True, 0)
        self.get_content_area().pack_start(self.entry, True, True, 0)

        self.add_button("OK", Gtk.ResponseType.OK)
        self.add_button("Cancel", Gtk.ResponseType.CANCEL)

        self.connect("key-press-event", self.keyPressed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号