當前位置: 首頁>>代碼示例>>Python>>正文


Python tkSimpleDialog.Dialog方法代碼示例

本文整理匯總了Python中tkSimpleDialog.Dialog方法的典型用法代碼示例。如果您正苦於以下問題:Python tkSimpleDialog.Dialog方法的具體用法?Python tkSimpleDialog.Dialog怎麽用?Python tkSimpleDialog.Dialog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在tkSimpleDialog的用法示例。


在下文中一共展示了tkSimpleDialog.Dialog方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: buttonbox

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def buttonbox(self):
        """
        Display only one button if there's no selection. Otherwise, use the default method to display two buttons.
        """
        if len(self.id_tuples) == 0:
            box = tk.Frame(self)

            w = tk.Button(
                box, text="OK", width=10, command=self.cancel, default="active"
            )
            w.pack(side="left", padx=5, pady=5)

            self.bind("<Return>", self.cancel)

            box.pack()
        else:
            tkSimpleDialog.Dialog.buttonbox(self) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:19,代碼來源:delete_dialog.py

示例2: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent_window, tree, title="Confirm Deletion"):
        self.tree = tree
        self.id_tuples = list()
        for x in self.tree.treeview.selection():
            if x not in [y[0] for y in self.id_tuples]:
                self.id_tuples.extend(subtree_ids(self.tree.treeview, x))
        tkSimpleDialog.Dialog.__init__(self, parent_window, title) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:9,代碼來源:delete_dialog.py

示例3: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent_window, title="New SeqLib"):
        self.element_tkstring = tk.StringVar()
        self.element_type = None
        tkSimpleDialog.Dialog.__init__(self, parent_window, title) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:6,代碼來源:create_seqlib_dialog.py

示例4: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent_window, title="Create Root Object"):
        self.element_tkstring = tk.StringVar()
        self.cfg_dict = dict()
        self.output_directory_tk = FileEntry(
            "Output Directory",
            self.cfg_dict,
            "output directory",
            optional=False,
            directory=True,
        )
        self.name_tk = StringEntry("Name", self.cfg_dict, "name", optional=False)
        self.element = None
        tkSimpleDialog.Dialog.__init__(self, parent_window, title) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:15,代碼來源:create_root_dialog.py

示例5: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(
        self, parent_window, tree, source_id, title="Confirm Filtering Changes"
    ):
        self.tree = tree
        self.source_id = source_id
        self.target_ids = [
            x
            for x in self.tree.treeview.selection()
            if x != source_id
            and type(self.tree.get_element(self.source_id))
            == type(self.tree.get_element(x))
        ]
        tkSimpleDialog.Dialog.__init__(self, parent_window, title) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:15,代碼來源:seqlib_apply_dialog.py

示例6: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent_window, title="Enrich2"):
        self.pw = parent_window

        self.dialog_text = tk.StringVar()
        self.dialog_text.set("Would you like to save your config changes?")

        tkSimpleDialog.Dialog.__init__(self, parent_window, title) 
開發者ID:FowlerLab,項目名稱:Enrich2,代碼行數:9,代碼來源:runner_window.py

示例7: show

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def show(self):
        tkSimpleDialog.Dialog.__init__(self, self._parent, "About S3 Uploader") 
開發者ID:charlesdaniel,項目名稱:s3_uploader,代碼行數:4,代碼來源:s3_uploader.py

示例8: destroy

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def destroy(self):
        tkSimpleDialog.Dialog.destroy(self) 
開發者ID:charlesdaniel,項目名稱:s3_uploader,代碼行數:4,代碼來源:s3_uploader.py

示例9: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent, title, prefDefaults):

        self.prefValues = prefDefaults

        tkSimpleDialog.Dialog.__init__(self, parent, title) 
開發者ID:PacktPublishing,項目名稱:Python-Network-Programming-Cookbook-Second-Edition,代碼行數:7,代碼來源:miniedit.py

示例10: __init__

# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def __init__(self, parent, name):

        self.name = name

        self.close = False
        self.save = False

        imgdir = os.path.join(os.path.dirname(__file__), 'img')

        self.img_logo = tk.PhotoImage("img_logo", file=os.path.join(imgdir, 'logo.gif'))

        tkSimpleDialog.Dialog.__init__(self, parent, "Confirm File Close") 
開發者ID:PCWG,項目名稱:PCWG,代碼行數:14,代碼來源:closable_Tab_with_menu.py


注:本文中的tkSimpleDialog.Dialog方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。