LexicGUILauncher.py 文件源码

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

项目:Lexic 作者: RasmusRendal 项目源码 文件源码
def __init__(self):
        Gtk.Window.__init__(self, title="LexicGUITest")
        self.set_keep_above(True)
        self.set_decorated(False)

        #Creates the top level parent box contain 2 children boxes
        self.mainBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=20)
        self.add(self.mainBox)

        #Creates the box for the top of the GUI
        self.topBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
        self.mainBox.pack_start(self.topBox, True, True, 0)

        #Create vertical box that the buttons will be placed in
        self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)

        #Add the box to the window
        #self.add(self.box)
        self.mainBox.pack_start(self.box, True, True, 0)

        #Add textField, and add it to the box
        self.searchField = Gtk.Entry()
        self.searchField.connect("key-release-event", enter_check)

        self.topBox.pack_start(self.searchField, True, True, 0)
        self.searchField.set_text("is")

        #Add search button
        self.search = Gtk.Button(label = "Search")
        self.topBox.pack_start(self.search, True, True, 0)
        self.search.connect("clicked", on_search_click, self.searchField.get_text())

        #Add the Suggestions label
        self.label = Gtk.Label(label="Suggestions:")
        self.box.pack_start(self.label, True, True, 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号