当前位置: 首页>>代码示例>>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;未经允许,请勿转载。