Merge branch 'coretk' into coretk-color
This commit is contained in:
commit
e649f2642d
16 changed files with 140 additions and 107 deletions
|
@ -1,6 +1,5 @@
|
|||
import logging
|
||||
import tkinter as tk
|
||||
from functools import partial
|
||||
from tkinter import ttk
|
||||
|
||||
from coretk import appconfig, themes
|
||||
|
@ -42,11 +41,9 @@ class Application(tk.Frame):
|
|||
|
||||
def setup_theme(self):
|
||||
themes.load(self.style)
|
||||
self.master.bind_class("Menu", "<<ThemeChanged>>", themes.theme_change_menu)
|
||||
self.master.bind("<<ThemeChanged>>", themes.theme_change)
|
||||
self.style.theme_use(self.guiconfig["preferences"]["theme"])
|
||||
func = partial(themes.theme_change_menu, self.style)
|
||||
self.master.bind_class("Menu", "<<ThemeChanged>>", func)
|
||||
func = partial(themes.theme_change, self.style)
|
||||
self.master.bind("<<ThemeChanged>>", func)
|
||||
|
||||
def setup_app(self):
|
||||
self.master.title("CORE")
|
||||
|
|
|
@ -20,6 +20,7 @@ from coretk.graph.shapeutils import ShapeType
|
|||
from coretk.interface import InterfaceManager
|
||||
from coretk.nodeutils import NodeDraw, NodeUtils
|
||||
|
||||
GUI_SOURCE = "gui"
|
||||
OBSERVERS = {
|
||||
"processes": "ps",
|
||||
"ifconfig": "ifconfig",
|
||||
|
@ -133,6 +134,14 @@ class CoreClient:
|
|||
self.custom_observers[observer.name] = observer
|
||||
|
||||
def handle_events(self, event):
|
||||
if event.session_id != self.session_id:
|
||||
logging.warn(
|
||||
"ignoring event session(%s) current(%s)",
|
||||
event.session_id,
|
||||
self.session_id,
|
||||
)
|
||||
return
|
||||
|
||||
if event.HasField("link_event"):
|
||||
logging.info("link event: %s", event)
|
||||
self.handle_link_event(event.link_event)
|
||||
|
@ -176,7 +185,7 @@ class CoreClient:
|
|||
logging.warning("unknown link event: %s", event.message_type)
|
||||
|
||||
def handle_node_event(self, event):
|
||||
if event.source == "gui":
|
||||
if event.source == GUI_SOURCE:
|
||||
return
|
||||
node_id = event.node.id
|
||||
x = event.node.position.x
|
||||
|
@ -195,6 +204,11 @@ class CoreClient:
|
|||
|
||||
def handle_throughputs(self, event):
|
||||
if event.session_id != self.session_id:
|
||||
logging.warn(
|
||||
"ignoring throughput event session(%s) current(%s)",
|
||||
event.session_id,
|
||||
self.session_id,
|
||||
)
|
||||
return
|
||||
logging.info("handling throughputs event: %s", event)
|
||||
self.app.canvas.throughput_draw.process_grpc_throughput_event(
|
||||
|
@ -424,7 +438,7 @@ class CoreClient:
|
|||
def edit_node(self, core_node):
|
||||
try:
|
||||
self.client.edit_node(
|
||||
self.session_id, core_node.id, core_node.position, source="gui"
|
||||
self.session_id, core_node.id, core_node.position, source=GUI_SOURCE
|
||||
)
|
||||
except grpc.RpcError as e:
|
||||
show_grpc_error(e)
|
||||
|
|
|
@ -24,10 +24,11 @@ class AlertsDialog(Dialog):
|
|||
self.top.columnconfigure(0, weight=1)
|
||||
self.top.rowconfigure(0, weight=1)
|
||||
self.top.rowconfigure(1, weight=1)
|
||||
row = 0
|
||||
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.grid(row=row, column=0, sticky="nsew", pady=PADY)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
frame.grid(sticky="nsew", pady=PADY)
|
||||
self.tree = ttk.Treeview(
|
||||
frame,
|
||||
columns=("time", "level", "session_id", "node", "source"),
|
||||
|
@ -35,15 +36,15 @@ class AlertsDialog(Dialog):
|
|||
)
|
||||
self.tree.grid(row=0, column=0, sticky="nsew")
|
||||
self.tree.column("time", stretch=tk.YES)
|
||||
self.tree.heading("time", text="time", anchor="w")
|
||||
self.tree.heading("time", text="Time")
|
||||
self.tree.column("level", stretch=tk.YES)
|
||||
self.tree.heading("level", text="level", anchor="w")
|
||||
self.tree.heading("level", text="Level")
|
||||
self.tree.column("session_id", stretch=tk.YES)
|
||||
self.tree.heading("session_id", text="session id", anchor="w")
|
||||
self.tree.heading("session_id", text="Session ID")
|
||||
self.tree.column("node", stretch=tk.YES)
|
||||
self.tree.heading("node", text="node", anchor="w")
|
||||
self.tree.heading("node", text="Node")
|
||||
self.tree.column("source", stretch=tk.YES)
|
||||
self.tree.heading("source", text="source", anchor="w")
|
||||
self.tree.heading("source", text="Source")
|
||||
self.tree.bind("<<TreeviewSelect>>", self.click_select)
|
||||
|
||||
for alarm in self.app.statusbar.core_alarms:
|
||||
|
@ -74,15 +75,13 @@ class AlertsDialog(Dialog):
|
|||
xscrollbar = ttk.Scrollbar(frame, orient="horizontal", command=self.tree.xview)
|
||||
xscrollbar.grid(row=1, sticky="ew")
|
||||
self.tree.configure(xscrollcommand=xscrollbar.set)
|
||||
row = row + 1
|
||||
|
||||
self.text = CodeText(self.top)
|
||||
self.text.config(state=tk.DISABLED)
|
||||
self.text.grid(row=row, column=0, sticky="nsew", pady=PADY)
|
||||
row = row + 1
|
||||
self.text.grid(sticky="nsew", pady=PADY)
|
||||
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(row=row, column=0, sticky="nsew")
|
||||
frame.grid(sticky="ew")
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.columnconfigure(1, weight=1)
|
||||
frame.columnconfigure(2, weight=1)
|
||||
|
|
|
@ -24,13 +24,17 @@ class ServicesSelectDialog(Dialog):
|
|||
self.top.columnconfigure(0, weight=1)
|
||||
self.top.rowconfigure(0, weight=1)
|
||||
|
||||
frame = ttk.Frame(self.top)
|
||||
frame = ttk.LabelFrame(self.top)
|
||||
frame.grid(stick="nsew", pady=PADY)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
for i in range(3):
|
||||
frame.columnconfigure(i, weight=1)
|
||||
self.groups = ListboxScroll(frame, text="Groups", padding=FRAME_PAD)
|
||||
self.groups.grid(row=0, column=0, sticky="nsew")
|
||||
label_frame = ttk.LabelFrame(frame, text="Groups", padding=FRAME_PAD)
|
||||
label_frame.grid(row=0, column=0, sticky="nsew")
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
self.groups = ListboxScroll(label_frame)
|
||||
self.groups.grid(sticky="nsew")
|
||||
for group in sorted(self.app.core.services):
|
||||
self.groups.listbox.insert(tk.END, group)
|
||||
self.groups.listbox.bind("<<ListboxSelect>>", self.handle_group_change)
|
||||
|
@ -45,8 +49,12 @@ class ServicesSelectDialog(Dialog):
|
|||
)
|
||||
self.services.grid(row=0, column=1, sticky="nsew")
|
||||
|
||||
self.current = ListboxScroll(frame, text="Selected", padding=FRAME_PAD)
|
||||
self.current.grid(row=0, column=2, sticky="nsew")
|
||||
label_frame = ttk.LabelFrame(frame, text="Selected", padding=FRAME_PAD)
|
||||
label_frame.grid(row=0, column=2, sticky="nsew")
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
self.current = ListboxScroll(label_frame)
|
||||
self.current.grid(sticky="nsew")
|
||||
for service in sorted(self.current_services):
|
||||
self.current.listbox.insert(tk.END, service)
|
||||
|
||||
|
@ -109,12 +117,12 @@ class CustomNodesDialog(Dialog):
|
|||
self.draw_buttons()
|
||||
|
||||
def draw_node_config(self):
|
||||
frame = ttk.Frame(self.top)
|
||||
frame = ttk.LabelFrame(self.top, text="Nodes", padding=FRAME_PAD)
|
||||
frame.grid(sticky="nsew", pady=PADY)
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
|
||||
self.nodes_list = ListboxScroll(frame, text="Nodes", padding=FRAME_PAD)
|
||||
self.nodes_list = ListboxScroll(frame)
|
||||
self.nodes_list.grid(row=0, column=0, sticky="nsew", padx=PADX)
|
||||
self.nodes_list.listbox.bind("<<ListboxSelect>>", self.handle_node_select)
|
||||
for name in sorted(self.app.core.custom_nodes):
|
||||
|
|
|
@ -4,7 +4,7 @@ from tkinter import ttk
|
|||
from core.api.grpc import core_pb2
|
||||
from coretk.dialogs.dialog import Dialog
|
||||
from coretk.themes import PADX, PADY
|
||||
from coretk.widgets import CodeText
|
||||
from coretk.widgets import CodeText, ListboxScroll
|
||||
|
||||
|
||||
class HookDialog(Dialog):
|
||||
|
@ -96,8 +96,9 @@ class HooksDialog(Dialog):
|
|||
self.top.columnconfigure(0, weight=1)
|
||||
self.top.rowconfigure(0, weight=1)
|
||||
|
||||
self.listbox = tk.Listbox(self.top)
|
||||
self.listbox.grid(sticky="nsew", pady=PADY)
|
||||
listbox_scroll = ListboxScroll(self.top)
|
||||
listbox_scroll.grid(sticky="nsew", pady=PADY)
|
||||
self.listbox = listbox_scroll.listbox
|
||||
self.listbox.bind("<<ListboxSelect>>", self.select)
|
||||
for hook_file in self.app.core.hooks:
|
||||
self.listbox.insert(tk.END, hook_file)
|
||||
|
|
|
@ -40,8 +40,12 @@ class NodeService(Dialog):
|
|||
frame.rowconfigure(0, weight=1)
|
||||
for i in range(3):
|
||||
frame.columnconfigure(i, weight=1)
|
||||
self.groups = ListboxScroll(frame, text="Groups", padding=FRAME_PAD)
|
||||
self.groups.grid(row=0, column=0, sticky="nsew")
|
||||
label_frame = ttk.LabelFrame(frame, text="Groups", padding=FRAME_PAD)
|
||||
label_frame.grid(row=0, column=0, sticky="nsew")
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
self.groups = ListboxScroll(label_frame)
|
||||
self.groups.grid(sticky="nsew")
|
||||
for group in sorted(self.app.core.services):
|
||||
self.groups.listbox.insert(tk.END, group)
|
||||
self.groups.listbox.bind("<<ListboxSelect>>", self.handle_group_change)
|
||||
|
@ -56,8 +60,12 @@ class NodeService(Dialog):
|
|||
)
|
||||
self.services.grid(row=0, column=1, sticky="nsew")
|
||||
|
||||
self.current = ListboxScroll(frame, text="Selected", padding=FRAME_PAD)
|
||||
self.current.grid(row=0, column=2, sticky="nsew")
|
||||
label_frame = ttk.LabelFrame(frame, text="Selected", padding=FRAME_PAD)
|
||||
label_frame.grid(row=0, column=2, sticky="nsew")
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
self.current = ListboxScroll(label_frame)
|
||||
self.current.grid(sticky="nsew")
|
||||
for service in sorted(self.current_services):
|
||||
self.current.listbox.insert(tk.END, service)
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ from tkinter import ttk
|
|||
from coretk.coreclient import Observer
|
||||
from coretk.dialogs.dialog import Dialog
|
||||
from coretk.themes import PADX, PADY
|
||||
from coretk.widgets import ListboxScroll
|
||||
|
||||
|
||||
class ObserverDialog(Dialog):
|
||||
|
@ -27,24 +28,16 @@ class ObserverDialog(Dialog):
|
|||
self.draw_apply_buttons()
|
||||
|
||||
def draw_listbox(self):
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(sticky="nsew", pady=PADY)
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
|
||||
scrollbar = ttk.Scrollbar(frame, orient=tk.VERTICAL)
|
||||
scrollbar.grid(row=0, column=1, sticky="ns")
|
||||
|
||||
self.observers = tk.Listbox(
|
||||
frame, selectmode=tk.SINGLE, yscrollcommand=scrollbar.set
|
||||
)
|
||||
listbox_scroll = ListboxScroll(self.top)
|
||||
listbox_scroll.grid(sticky="nsew", pady=PADY)
|
||||
listbox_scroll.columnconfigure(0, weight=1)
|
||||
listbox_scroll.rowconfigure(0, weight=1)
|
||||
self.observers = listbox_scroll.listbox
|
||||
self.observers.grid(row=0, column=0, sticky="nsew")
|
||||
self.observers.bind("<<ListboxSelect>>", self.handle_observer_change)
|
||||
for name in sorted(self.app.core.custom_observers):
|
||||
self.observers.insert(tk.END, name)
|
||||
|
||||
scrollbar.config(command=self.observers.yview)
|
||||
|
||||
def draw_form_fields(self):
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(sticky="ew", pady=PADY)
|
||||
|
|
|
@ -4,6 +4,7 @@ from tkinter import ttk
|
|||
from coretk.coreclient import CoreServer
|
||||
from coretk.dialogs.dialog import Dialog
|
||||
from coretk.themes import FRAME_PAD, PADX, PADY
|
||||
from coretk.widgets import ListboxScroll
|
||||
|
||||
DEFAULT_NAME = "example"
|
||||
DEFAULT_ADDRESS = "127.0.0.1"
|
||||
|
@ -32,25 +33,18 @@ class ServersDialog(Dialog):
|
|||
self.draw_apply_buttons()
|
||||
|
||||
def draw_servers(self):
|
||||
frame = ttk.Frame(self.top)
|
||||
frame.grid(pady=PADY, sticky="nsew")
|
||||
frame.columnconfigure(0, weight=1)
|
||||
frame.rowconfigure(0, weight=1)
|
||||
listbox_scroll = ListboxScroll(self.top)
|
||||
listbox_scroll.grid(pady=PADY, sticky="nsew")
|
||||
listbox_scroll.columnconfigure(0, weight=1)
|
||||
listbox_scroll.rowconfigure(0, weight=1)
|
||||
|
||||
scrollbar = ttk.Scrollbar(frame, orient=tk.VERTICAL)
|
||||
scrollbar.grid(row=0, column=1, sticky="ns")
|
||||
|
||||
self.servers = tk.Listbox(
|
||||
frame, selectmode=tk.SINGLE, yscrollcommand=scrollbar.set
|
||||
)
|
||||
self.servers = listbox_scroll.listbox
|
||||
self.servers.grid(row=0, column=0, sticky="nsew")
|
||||
self.servers.bind("<<ListboxSelect>>", self.handle_server_change)
|
||||
|
||||
for server in self.app.core.servers:
|
||||
self.servers.insert(tk.END, server)
|
||||
|
||||
scrollbar.config(command=self.servers.yview)
|
||||
|
||||
def draw_server_configuration(self):
|
||||
frame = ttk.LabelFrame(self.top, text="Server Configuration", padding=FRAME_PAD)
|
||||
frame.grid(pady=PADY, sticky="ew")
|
||||
|
|
|
@ -216,32 +216,32 @@ class ServiceConfiguration(Dialog):
|
|||
tab.columnconfigure(0, weight=1)
|
||||
for i in range(3):
|
||||
tab.rowconfigure(i, weight=1)
|
||||
self.notebook.add(tab, text="Startup/shutdown")
|
||||
self.notebook.add(tab, text="Startup/Shutdown")
|
||||
|
||||
# tab 3
|
||||
for i in range(3):
|
||||
label_frame = None
|
||||
if i == 0:
|
||||
label_frame = ttk.LabelFrame(
|
||||
tab, text="Startup commands", padding=FRAME_PAD
|
||||
tab, text="Startup Commands", padding=FRAME_PAD
|
||||
)
|
||||
commands = self.startup_commands
|
||||
elif i == 1:
|
||||
label_frame = ttk.LabelFrame(
|
||||
tab, text="Shutdown commands", padding=FRAME_PAD
|
||||
tab, text="Shutdown Commands", padding=FRAME_PAD
|
||||
)
|
||||
commands = self.shutdown_commands
|
||||
elif i == 2:
|
||||
label_frame = ttk.LabelFrame(
|
||||
tab, text="Validation commands", padding=FRAME_PAD
|
||||
tab, text="Validation Commands", padding=FRAME_PAD
|
||||
)
|
||||
commands = self.validation_commands
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
label_frame.rowconfigure(1, weight=1)
|
||||
label_frame.grid(row=i, column=0, sticky="nsew")
|
||||
label_frame.grid(row=i, column=0, sticky="nsew", pady=PADY)
|
||||
|
||||
frame = ttk.Frame(label_frame)
|
||||
frame.grid(row=0, column=0, sticky="nsew")
|
||||
frame.grid(row=0, column=0, sticky="nsew", pady=PADY)
|
||||
frame.columnconfigure(0, weight=1)
|
||||
entry = ttk.Entry(frame, textvariable=tk.StringVar())
|
||||
entry.grid(row=0, column=0, stick="ew", padx=PADX)
|
||||
|
@ -251,7 +251,7 @@ class ServiceConfiguration(Dialog):
|
|||
button = ttk.Button(frame, image=self.editdelete_img)
|
||||
button.grid(row=0, column=2, sticky="ew")
|
||||
button.bind("<Button-1>", self.delete_command)
|
||||
listbox_scroll = ListboxScroll(label_frame, borderwidth=0)
|
||||
listbox_scroll = ListboxScroll(label_frame)
|
||||
listbox_scroll.listbox.bind("<<ListboxSelect>>", self.update_entry)
|
||||
for command in commands:
|
||||
listbox_scroll.listbox.insert("end", command)
|
||||
|
@ -303,13 +303,21 @@ class ServiceConfiguration(Dialog):
|
|||
)
|
||||
self.validation_period_entry.grid(row=2, column=1, sticky="ew")
|
||||
|
||||
listbox_scroll = ListboxScroll(tab, text="Executables", padding=FRAME_PAD)
|
||||
listbox_scroll.grid(sticky="nsew", pady=PADY)
|
||||
label_frame = ttk.LabelFrame(tab, text="Executables", padding=FRAME_PAD)
|
||||
label_frame.grid(sticky="nsew", pady=PADY)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
listbox_scroll = ListboxScroll(label_frame)
|
||||
listbox_scroll.grid(sticky="nsew")
|
||||
tab.rowconfigure(listbox_scroll.grid_info()["row"], weight=1)
|
||||
for executable in self.executables:
|
||||
listbox_scroll.listbox.insert("end", executable)
|
||||
|
||||
listbox_scroll = ListboxScroll(tab, text="Dependencies", padding=FRAME_PAD)
|
||||
label_frame = ttk.LabelFrame(tab, text="Dependencies", padding=FRAME_PAD)
|
||||
label_frame.grid(sticky="nsew", pady=PADY)
|
||||
label_frame.columnconfigure(0, weight=1)
|
||||
label_frame.rowconfigure(0, weight=1)
|
||||
listbox_scroll = ListboxScroll(label_frame)
|
||||
listbox_scroll.grid(sticky="nsew")
|
||||
tab.rowconfigure(listbox_scroll.grid_info()["row"], weight=1)
|
||||
for dependency in self.dependencies:
|
||||
|
|
|
@ -168,7 +168,7 @@ class CanvasNode:
|
|||
is_wlan = self.core_node.type == NodeType.WIRELESS_LAN
|
||||
is_emane = self.core_node.type == NodeType.EMANE
|
||||
context = tk.Menu(self.canvas)
|
||||
themes.update_menu(self.app.style, context)
|
||||
themes.style_menu(context)
|
||||
if self.app.core.is_runtime():
|
||||
context.add_command(label="Configure", command=self.show_config)
|
||||
if NodeUtils.is_container_node(self.core_node.type):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import logging
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
|
||||
THEME_DARK = "black"
|
||||
PADX = (0, 5)
|
||||
|
@ -141,30 +141,43 @@ def load(style):
|
|||
)
|
||||
|
||||
|
||||
def update_bg(style, event):
|
||||
logging.info("updating background: %s", event.widget)
|
||||
bg = style.lookup(".", "background")
|
||||
event.widget.config(background=bg)
|
||||
|
||||
|
||||
def theme_change_menu(style, event):
|
||||
def theme_change_menu(event):
|
||||
if not isinstance(event.widget, tk.Menu):
|
||||
return
|
||||
update_menu(style, event.widget)
|
||||
style_menu(event.widget)
|
||||
|
||||
|
||||
def update_menu(style, widget):
|
||||
def style_menu(widget):
|
||||
style = ttk.Style()
|
||||
bg = style.lookup(".", "background")
|
||||
fg = style.lookup(".", "foreground")
|
||||
abg = style.lookup(".", "lightcolor")
|
||||
if not abg:
|
||||
abg = bg
|
||||
widget.config(
|
||||
background=bg, foreground=fg, activebackground=abg, activeforeground=fg
|
||||
background=bg, foreground=fg, activebackground=abg, activeforeground=fg, bd=0
|
||||
)
|
||||
|
||||
|
||||
def theme_change(style, event):
|
||||
def style_listbox(widget):
|
||||
style = ttk.Style()
|
||||
bg = style.lookup(".", "background")
|
||||
fg = style.lookup(".", "foreground")
|
||||
bc = style.lookup(".", "bordercolor")
|
||||
if not bc:
|
||||
bc = "black"
|
||||
widget.config(
|
||||
background=bg,
|
||||
foreground=fg,
|
||||
highlightthickness=1,
|
||||
highlightcolor=bc,
|
||||
highlightbackground=bc,
|
||||
bd=0,
|
||||
)
|
||||
|
||||
|
||||
def theme_change(event):
|
||||
style = ttk.Style()
|
||||
style.configure(Styles.picker_button, font=("TkDefaultFont", 8, "normal"))
|
||||
style.configure(
|
||||
Styles.green_alert,
|
||||
|
|
|
@ -5,6 +5,7 @@ from tkinter import filedialog, font, ttk
|
|||
from tkinter.scrolledtext import ScrolledText
|
||||
|
||||
from core.api.grpc import core_pb2
|
||||
from coretk import themes
|
||||
from coretk.appconfig import ICONS_PATH
|
||||
from coretk.themes import FRAME_PAD, PADX, PADY
|
||||
|
||||
|
@ -174,7 +175,7 @@ class ConfigFrame(FrameScroll):
|
|||
return {x: self.config[x].value for x in self.config}
|
||||
|
||||
|
||||
class ListboxScroll(ttk.LabelFrame):
|
||||
class ListboxScroll(ttk.Frame):
|
||||
def __init__(self, master=None, **kw):
|
||||
super().__init__(master, **kw)
|
||||
self.columnconfigure(0, weight=1)
|
||||
|
@ -184,6 +185,7 @@ class ListboxScroll(ttk.LabelFrame):
|
|||
self.listbox = tk.Listbox(
|
||||
self, selectmode=tk.SINGLE, yscrollcommand=self.scrollbar.set
|
||||
)
|
||||
themes.style_listbox(self.listbox)
|
||||
self.listbox.grid(row=0, column=0, sticky="nsew")
|
||||
self.scrollbar.config(command=self.listbox.yview)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue