本文整理汇总了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")