Python ttk.Separator() Examples
The following are 8
code examples of ttk.Separator().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
ttk
, or try the search function
.
Example #1
Source File: stats.py From EDMarketConnector with GNU General Public License v2.0 | 5 votes |
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)
Example #2
Source File: test_widgets.py From oss-ftp with MIT License | 5 votes |
def create(self, **kwargs): return ttk.Separator(self.root, **kwargs)
Example #3
Source File: edrtogglingpanel.py From edr with Apache License 2.0 | 5 votes |
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)
Example #4
Source File: builderWindow.py From universalSmashSystem with GNU General Public License v3.0 | 5 votes |
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)
Example #5
Source File: test_widgets.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def create(self, **kwargs): return ttk.Separator(self.root, **kwargs)
Example #6
Source File: Skeleton_Key.py From firmware_password_manager with MIT License | 4 votes |
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)
Example #7
Source File: Skeleton_Key.py From firmware_password_manager with MIT License | 4 votes |
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)
Example #8
Source File: edrclient.py From edr with Apache License 2.0 | 4 votes |
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