当前位置: 首页>>代码示例>>Python>>正文


Python Popup.hide方法代码示例

本文整理汇总了Python中efl.elementary.popup.Popup.hide方法的典型用法代码示例。如果您正苦于以下问题:Python Popup.hide方法的具体用法?Python Popup.hide怎么用?Python Popup.hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在efl.elementary.popup.Popup的用法示例。


在下文中一共展示了Popup.hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cb_popup_center_text_1button_hide_show

# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import hide [as 别名]
def cb_popup_center_text_1button_hide_show(li, item, win):
    global times
    global g_popup

    times += 1

    if g_popup is not None:
        g_popup.text = "You have checked this popup %d times." % times
        g_popup.show()
        return

    g_popup = Popup(win, size_hint_weight=EXPAND_BOTH)
    g_popup.text = "Hide this popup by using the button." \
                   "When you click list item again, you will see this popup again."

    bt = Button(win, text="Hide")
    bt.callback_clicked_add(lambda b: g_popup.hide())
    g_popup.part_content_set("button1", bt)

    g_popup.show()
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:22,代码来源:test_popup.py

示例2: FileSelector

# 需要导入模块: from efl.elementary.popup import Popup [as 别名]
# 或者: from efl.elementary.popup.Popup import hide [as 别名]

#.........这里部分代码省略.........
        self.pack_end(self.fileSelectorBox)
        self.pack_end(self.buttonBox)

        self.populateBookmarks()
        
        self.createPopup = Popup(self)
        self.createPopup.part_text_set("title,text", "Create Folder:")

        self.createEn = en = Entry(self, size_hint_weight=EXPAND_HORIZ,
                size_hint_align=FILL_HORIZ)
        en.single_line_set(True)
        en.scrollable_set(True)
        en.show()
        
        self.createPopup.content = en

        bt = Button(self, text="Create")
        bt.callback_clicked_add(self.createFolder)
        self.createPopup.part_content_set("button1", bt)

        bt2 = Button(self, text="Cancel")
        bt2.callback_clicked_add(self.closePopup)
        self.createPopup.part_content_set("button2", bt2)

        if defaultPopulate:
            self.populateFiles(startPath)

    def folderOnlySet(self, ourValue):
        self.folderOnly = ourValue
        
        if not self.folderOnly:
            self.filenameBox.show()
        else:
            self.filenameBox.hide()

    def createFolder(self, obj):
        newDir = "%s%s"%(self.currentDirectory, self.createEn.text)
        os.makedirs(newDir)
        self.closePopup()
        self.populateFiles(self.currentDirectory)

    def createFolderButtonPressed(self, obj):
        self.createEn.text = ""
        self.createPopup.show()
        self.createEn.select_all()
    
    def closePopup(self, btn=None):
        self.createPopup.hide()

    def shutdown(self, obj=None):
        self._timer.delete()
        self.threadedFunction.shutdown()

    def sortData(self, btn):
        self.sortReverse = not self.sortReverse
        
        if self.sortReverse:
            self.fileSortButton.text = u"⬇ Name"
        else:
            self.fileSortButton.text = u"⬆ Name"
        
        self.populateFiles(self.currentDirectory)

    def populateBookmarks(self):
        con = Icon(self, size_hint_weight=EXPAND_BOTH,
                size_hint_align=FILL_BOTH)
开发者ID:JeffHoogland,项目名称:bodhi4packages,代码行数:70,代码来源:fileselector.py


注:本文中的efl.elementary.popup.Popup.hide方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。