You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
806 B
36 lines
806 B
1 year ago
|
import ttkbootstrap as ttk
|
||
|
from ttkbootstrap.style import StyleBuilderTTK, Style
|
||
|
from ttkbootstrap.tableview import Tableview
|
||
|
from ttkbootstrap.constants import *
|
||
|
|
||
|
app = ttk.Window()
|
||
|
app.geometry("400x300")
|
||
|
colors = app.style.colors
|
||
|
|
||
|
coldata = [
|
||
|
{"text": "LicenseNumber", "stretch": False},
|
||
|
"CompanyName",
|
||
|
{"text": "UserCount", "stretch": False},
|
||
|
]
|
||
|
|
||
|
rowdata = [
|
||
|
('A123', 'IzzyCo', 12),
|
||
|
('A136', 'Kimdee Inc.', 45),
|
||
|
('A158', 'Farmadding Co.', 36)
|
||
|
]
|
||
|
labe = ttk.Labelframe(app, text="fdas")
|
||
|
dt = Tableview(
|
||
|
master=labe,
|
||
|
coldata=coldata,
|
||
|
paginated=True,
|
||
|
bootstyle=PRIMARY,
|
||
|
height=80
|
||
|
)
|
||
|
dt.insert_rows(END, rowdata)
|
||
|
dt.load_table_data()
|
||
|
|
||
|
ttk.Style().configure("TLabelframe", font="-size 18")
|
||
|
|
||
|
labe.pack()
|
||
|
dt.pack(fill=BOTH, expand=YES, padx=10, pady=10)
|
||
|
app.mainloop()
|