Fenster hinzugefügt.
This commit is contained in:
parent
28866b01b2
commit
8c483eab7e
31
pulstwahl.py
31
pulstwahl.py
@ -4,3 +4,34 @@
|
|||||||
|
|
||||||
print("Hello World!")
|
print("Hello World!")
|
||||||
|
|
||||||
|
import tkinter as tk
|
||||||
|
import tkinter.ttk as ttk
|
||||||
|
|
||||||
|
from tkinter import messagebox as tkm
|
||||||
|
from tkinter import font as tkfont
|
||||||
|
|
||||||
|
import locale
|
||||||
|
loc = locale.getlocale()
|
||||||
|
print("Got locale: {}".format(loc))
|
||||||
|
|
||||||
|
mydefaultfont = ('Helvetica', 11)
|
||||||
|
myfont = "Helvetica 14"
|
||||||
|
mygradefont = "Helvetica 40"
|
||||||
|
mylatexfont = ("C059", "10", "italic")
|
||||||
|
|
||||||
|
root = tk.Tk()
|
||||||
|
# Anpassung der dpi
|
||||||
|
dpi_value = root.winfo_fpixels('1i')
|
||||||
|
print("DPI {}".format(dpi_value))
|
||||||
|
# root.tk.call('tk', 'scaling', '-displayof', '.', dpi_value / 72.0)
|
||||||
|
root.tk.call('tk', 'scaling', dpi_value / 72.0)
|
||||||
|
root.attributes('-zoomed', True)
|
||||||
|
print(root.tk.call('info', 'patchlevel'))
|
||||||
|
style = ttk.Style(root)
|
||||||
|
style.theme_use("default")
|
||||||
|
style.configure('.', font = mydefaultfont)
|
||||||
|
#style.map('Treeview', foreground=st.fixed_map(style, 'foreground'),
|
||||||
|
# background=st.fixed_map(style, 'background'))
|
||||||
|
print(style.theme_use())
|
||||||
|
|
||||||
|
root.mainloop()
|
||||||
|
Loading…
Reference in New Issue
Block a user