本文整理匯總了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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例7: show
# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def show(self):
tkSimpleDialog.Dialog.__init__(self, self._parent, "About S3 Uploader")
示例8: destroy
# 需要導入模塊: import tkSimpleDialog [as 別名]
# 或者: from tkSimpleDialog import Dialog [as 別名]
def destroy(self):
tkSimpleDialog.Dialog.destroy(self)
示例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")