slightlynybbled / tk_tools

Python tkinter tools, Python3.7+
MIT License
101 stars 25 forks source link

Not able to set the fonts #42

Closed jamesagada closed 3 years ago

jamesagada commented 4 years ago

There is no way to change the fonts.

    helv36 = font.Font(family='Helvetica', size=12, weight='bold')
    self.driver = tk_tools.KeyValueEntry(
        root,
        width=guage_width,font=helv36,
        title='Driver',
        keys=['Name', 'Id', 'Trips'],
        enables=[False, False,False] 
         )

fails with

File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tk_tools/groups.py", line 308, in init super().init(self._parent, borderwidth=2, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/ttk.py", line 740, in init Widget.init(self, master, "ttk::frame", kw) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/ttk.py", line 557, in init tkinter.Widget.init(self, master, widgetname, kw=kw) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/init.py", line 2567, in init self.tk.call( _tkinter.TclError: unknown option "-font"

slightlynybbled commented 3 years ago

This was not the intended usage. Perhaps one could submit an API proposal and a pull request?