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


Python ttk.Separator方法代码示例

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


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

示例1: __init__

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def __init__(self, parent, label, status, show, *args, **options):
        conf = IGMConfig(config_file='config/igm_alt_config.v3.ini', user_config_file=['config/user_igm_alt_config.v3.ini', 'config/user_igm_alt_config.v2.ini'])
        tk.Frame.__init__(self, parent, *args, **options)
        fg = conf.rgb("status", "body")
        bg = conf.rgb("status", "fill")
        self.tk_setPalette(background=bg, foreground=fg, activeBackground=conf.rgb("status", "active_bg"), activeForeground=conf.rgb("status", "active_fg"))

        self.show = show
        self.title_frame = tk.Frame(self)
        self.title_frame.pack(fill="x", expand=1)

        ttk.Separator(self.title_frame, orient=tk.HORIZONTAL).pack(fill="x", expand=1)
        tk.Label(self.title_frame, text=label, foreground=conf.rgb("status", "label")).pack(side="left", fill="x", expand=0, anchor="w")
        self.status_ui = ttkHyperlinkLabel.HyperlinkLabel(self.title_frame, textvariable=status, foreground=fg, background=bg)
        self.status_ui.pack(side="left", fill="x", expand=0, anchor="w")
        
        self.toggle_button = tk.Checkbutton(self.title_frame, width=2, text='+', command=self.toggle,
                                            variable=self.show, foreground=conf.rgb("status", "check"))
        self.toggle_button.pack(side="right", expand=1, anchor="e")

        self.sub_frame = tk.Frame(self, relief="flat", borderwidth=0) 
开发者ID:lekeno,项目名称:edr,代码行数:23,代码来源:edrtogglingpanel.py

示例2: addpageheader

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def addpageheader(self, parent, header, align=None):
        self.addpagerow(parent, header, align=align)
        ttk.Separator(parent, orient=tk.HORIZONTAL).grid(columnspan=len(header), padx=10, pady=2, sticky=tk.EW) 
开发者ID:EDCD,项目名称:EDMarketConnector,代码行数:5,代码来源:stats.py

示例3: create

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def create(self, **kwargs):
        return ttk.Separator(self.root, **kwargs) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:4,代码来源:test_widgets.py

示例4: __init__

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def __init__(self,_root):
        Toplevel.__init__(self)
        self.title("Create a new Action")
        self.root = _root
        name_label = Label(self,text="Action Name: ")
        self.name = Entry(self)
        button = Button(self, text="Confirm", command=self.submit)
        
        sep = ttk.Separator(self,orient=HORIZONTAL)
        sep_text = Label(self,text="Or choose a Basic Action to implement:")
        
        basic_list = []
                    
        for name, obj in inspect.getmembers(sys.modules[engine.baseActions.__name__]):
            if inspect.isclass(obj):
                if not name in self.root.action_pane.data_panel.panel_windows['Actions'].act_list:
                    #print(basic_list)
                    basic_list.append(name)
                    
        self.basic_choice = StringVar(self)
        basic_box = OptionMenu(self,self.basic_choice,*basic_list)
        basic_button = Button(self,text="Confirm",command=self.submitBasic)
        
        name_label.grid(row=0,column=0)
        self.name.grid(row=0,column=1)
        button.grid(row=0,column=2)
        sep.grid(row=1,columnspan=3,sticky=E+W)
        sep_text.grid(row=1,columnspan=3)
        basic_box.grid(row=2,columnspan=2,sticky=E+W)
        basic_button.grid(row=2,column=2) 
开发者ID:digiholic,项目名称:universalSmashSystem,代码行数:32,代码来源:builderWindow.py

示例5: master_pane

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def master_pane(self):
        """
        The home pane.
        """
        self.logger.info("%s: activated" % inspect.stack()[0][3])
        self.logger.info("%s" % inspect.stack()[1][3])

        self.mainframe = ttk.Frame(self.superframe, width=604, height=510)
        self.mainframe.grid(column=0, row=2, sticky=(N, W, E, S))

        self.mainframe.grid_rowconfigure(0, weight=1)
        self.mainframe.grid_rowconfigure(5, weight=1)
        self.mainframe.grid_columnconfigure(0, weight=1)
        self.mainframe.grid_columnconfigure(2, weight=1)

        self.change_state_btn = ttk.Button(self.mainframe, width=20, text="Change State", command=self.change_state)
        self.change_state_btn.grid(column=0, row=80, pady=4, columnspan=3)
        self.change_state_btn.configure(state=self.state_button_state)

        self.info_status_label = ttk.Label(self.mainframe, text='Location of keyfile:')
        self.info_status_label.grid(column=0, row=90, pady=8, columnspan=3)

        ttk.Button(self.mainframe, width=20, text="Retrieve from JSS Script", command=self.jss_pane).grid(column=0, row=100, pady=4, columnspan=3)

        ttk.Button(self.mainframe, width=20, text="Fetch from Remote Volume", command=self.remote_nav_pane).grid(column=0, row=200, pady=4, columnspan=3)
        ttk.Button(self.mainframe, width=20, text="Retrieve from Local Volume", command=self.local_nav_pane).grid(column=0, row=300, pady=4, columnspan=3)
        ttk.Button(self.mainframe, width=20, text="Enter Firmware Password", command=self.direct_entry_pane).grid(column=0, row=320, pady=4, columnspan=3)

        ttk.Separator(self.mainframe, orient=HORIZONTAL).grid(row=400, columnspan=3, sticky=(E, W), pady=8)

        hash_display = ttk.Entry(self.mainframe, width=58, textvariable=self.hashed_results)
        hash_display.grid(column=0, row=450, columnspan=4)

        self.hash_btn = ttk.Button(self.mainframe, width=20, text="Copy hash to clipboard", command=self.copy_hash)
        self.hash_btn.grid(column=0, row=500, pady=4, columnspan=3)
        self.hash_btn.configure(state=self.hash_button_state)

        ttk.Separator(self.mainframe, orient=HORIZONTAL).grid(row=700, columnspan=3, sticky=(E, W), pady=8)

        self.status_label = ttk.Label(self.mainframe, textvariable=self.status_string)
        self.status_label.grid(column=0, row=2100, sticky=W, columnspan=2)

        ttk.Button(self.mainframe, text="Quit", width=6, command=self.root.destroy).grid(column=2, row=2100, sticky=E) 
开发者ID:univ-of-utah-marriott-library-apple,项目名称:firmware_password_manager,代码行数:45,代码来源:Skeleton_Key.py

示例6: remote_nav_pane

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def remote_nav_pane(self):
        """
        Connect to server and select keyfile.
        """
        self.logger.info("%s: activated" % inspect.stack()[0][3])
        self.mainframe.grid_remove()

        try:
            if self.config_options["keyfile"]["remote_type"] == 'smb':
                if self.config_options["keyfile"]["server_path"]:
                    self.remote_hostname.set(self.config_options["keyfile"]["server_path"])

                if self.config_options["keyfile"]["username"]:
                    self.remote_username.set(self.config_options["keyfile"]["username"])

                if self.config_options["keyfile"]["password"]:
                    self.remote_password.set(self.config_options["keyfile"]["password"])
        except:
            pass

        self.remote_nav_frame = ttk.Frame(self.superframe, width=604, height=510)
        self.remote_nav_frame.grid(column=0, row=2, sticky=(N, W, E, S))

        self.remote_nav_frame.grid_columnconfigure(0, weight=1)
        self.remote_nav_frame.grid_columnconfigure(1, weight=1)
        self.remote_nav_frame.grid_columnconfigure(2, weight=1)
        self.remote_nav_frame.grid_columnconfigure(3, weight=1)

        ttk.Label(self.remote_nav_frame, text="Read keyfile from remote server: (ie smb://...)").grid(column=0, row=100, columnspan=4, sticky=(E, W))

        ttk.Label(self.remote_nav_frame, text="Server path:").grid(column=0, row=150, sticky=E)
        hname_entry = ttk.Entry(self.remote_nav_frame, width=30, textvariable=self.remote_hostname)
        hname_entry.grid(column=1, row=150, sticky=W, columnspan=2)

        ttk.Label(self.remote_nav_frame, text="Username:").grid(column=0, row=200, sticky=E)
        uname_entry = ttk.Entry(self.remote_nav_frame, width=30, textvariable=self.remote_username)
        uname_entry.grid(column=1, row=200, sticky=W, columnspan=2)

        ttk.Label(self.remote_nav_frame, text="Password:").grid(column=0, row=250, sticky=E)
        pword_entry = ttk.Entry(self.remote_nav_frame, width=30, textvariable=self.remote_password, show="*")
        pword_entry.grid(column=1, row=250, sticky=W, columnspan=2)

        ttk.Button(self.remote_nav_frame, text="Read keyfile", width=15, default='active', command=self.read_remote).grid(column=1, row=300, columnspan=2, pady=12)

        ttk.Separator(self.remote_nav_frame, orient=HORIZONTAL).grid(row=1000, columnspan=50, pady=12, sticky=(E, W))

        ttk.Button(self.remote_nav_frame, text="Return to home", command=self.master_pane).grid(column=2, row=1100, sticky=E)
        ttk.Button(self.remote_nav_frame, text="Quit", width=6, command=self.root.destroy).grid(column=3, row=1100, sticky=W) 
开发者ID:univ-of-utah-marriott-library-apple,项目名称:firmware_password_manager,代码行数:50,代码来源:Skeleton_Key.py

示例7: prefs_ui

# 需要导入模块: import ttk [as 别名]
# 或者: from ttk import Separator [as 别名]
def prefs_ui(self, parent):
        frame = notebook.Frame(parent)
        frame.columnconfigure(1, weight=1)

        # Translators: this is shown in the preferences panel
        ttkHyperlinkLabel.HyperlinkLabel(frame, text=_(u"EDR website"), background=notebook.Label().cget('background'), url="https://edrecon.com", underline=True).grid(padx=10, sticky=tk.W)       
        ttkHyperlinkLabel.HyperlinkLabel(frame, text=_(u"EDR community"), background=notebook.Label().cget('background'), url="https://edrecon.com/discord", underline=True).grid(padx=10, sticky=tk.W)       

        # Translators: this is shown in the preferences panel
        notebook.Label(frame, text=_(u'Credentials')).grid(padx=10, sticky=tk.W)
        ttk.Separator(frame, orient=tk.HORIZONTAL).grid(columnspan=2, padx=10, pady=2, sticky=tk.EW)
        # Translators: this is shown in the preferences panel
        cred_label = notebook.Label(frame, text=_(u'Log in with your EDR account for full access (https://edrecon.com/account)'))
        cred_label.grid(padx=10, columnspan=2, sticky=tk.W)

        notebook.Label(frame, text=_(u"Email")).grid(padx=10, row=11, sticky=tk.W)
        notebook.Entry(frame, textvariable=self._email).grid(padx=10, row=11,
                                                             column=1, sticky=tk.EW)

        notebook.Label(frame, text=_(u"Password")).grid(padx=10, row=12, sticky=tk.W)
        notebook.Entry(frame, textvariable=self._password,
                       show=u'*').grid(padx=10, row=12, column=1, sticky=tk.EW)

        notebook.Label(frame, text=_(u'Sitrep Broadcasts')).grid(padx=10, row=14, sticky=tk.W)
        ttk.Separator(frame, orient=tk.HORIZONTAL).grid(columnspan=2, padx=10, pady=2, sticky=tk.EW)
        notebook.Label(frame, text=_("Redact my info")).grid(padx=10, row = 16, sticky=tk.W)
        choices = { _(u'Auto'),_(u'Always'),_(u'Never')}
        popupMenu = notebook.OptionMenu(frame, self._anonymous_reports, self.anonymous_reports, *choices)
        popupMenu.grid(padx=10, row=16, column=1, sticky=tk.EW)
        popupMenu["menu"].configure(background="white", foreground="black")

        if self.server.is_authenticated():
            if self.is_anonymous():
                self.status = _(u"authenticated (guest).")
            else:
                self.status = _(u"authenticated.")
        else:
            self.status = _(u"not authenticated.")

        # Translators: this is shown in the preferences panel as a heading for feedback options (e.g. overlay, audio cues)
        notebook.Label(frame, text=_(u"EDR Feedback:")).grid(padx=10, row=17, sticky=tk.W)
        ttk.Separator(frame, orient=tk.HORIZONTAL).grid(columnspan=2, padx=10, pady=2, sticky=tk.EW)
        
        notebook.Checkbutton(frame, text=_(u"Overlay"),
                             variable=self._visual_feedback).grid(padx=10, row=19,
                                                                  sticky=tk.W)
        notebook.Checkbutton(frame, text=_(u"Sound"),
                             variable=self._audio_feedback).grid(padx=10, row=20, sticky=tk.W)


        return frame 
开发者ID:lekeno,项目名称:edr,代码行数:53,代码来源:edrclient.py


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