My code effectively enlarges the font size of the column headings; however, I aim to further increase the font size of the row data beneath to 30 and apply bold formatting. There are ten rows, which include Purchase, Sale, Income, Expense, Salary, Load, and others, alongside three column headings—Title, Debit, and Credit—formatted in bold with a font size of 30. At present, the font size for the row data is set to a standard size of 10. I intend to elevate the font size of all row data to 50 for my manager’s review, facilitating a clear and comprehensive overview at a glance.
from tkinter import *
import tkinter.ttk as ttk
root = Tk()
style = ttk.Style()
style.configure("mystyle.Treeview", highlightthickness=0, bd=0, font=('Calibri', 16)) # Modify the font of the body
style.configure("mystyle.Treeview.Heading", font=('Calibri', 16,'bold')) # Modify the font of the headings
style.layout("mystyle.Treeview", [('mystyle.Treeview.treearea', {'sticky': 'nswe'})])
tree = ttk.Treeview(root, style="mystyle.Treeview")
tree.pack()
tree["columns"] = ("one", "two", "three")
tree.column("one", width=150)
tree.column("two", width=150)
tree.column("three", width=150)
tree.heading("one", text="Naar")
tree.heading("two", text="Spoor")
tree.heading("three", text="Vetrektijd")
tree['show'] = 'headings'
tree.insert("", 'end', values=('aboba', 'aboba', 'aboba'))
tree.insert("", 'end', values=('aboba', 'aboba', 'aboba'))
tree.insert("", 'end', values=('aboba', 'aboba', 'aboba'))
tree.insert("", 'end', values=('aboba', 'aboba', 'aboba'))
root.mainloop()
style.configure("mystyle.Treeview", highlightthickness=0, bd=0, font=('Calibri', 16)) # Modify the
1