Python Forum
[Tkinter] proportional fonts
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] proportional fonts
#1
Hi,
I have developed a tkinter app that is suposed to work on 1920x1080 and 1920x1200 PCs (windows).
Using :
width= root.winfo_screenwidth()
height= root.winfo_screenheight()
root.geometry(f'{width}x{height}')
I can manage that, but a vertical row of buttons sqeezes out the 2 bottom ones on 1920x1080 because the develoment pc is 1920x1200..
I suspect it's the button font size that causes the problem.
Question: does the font size of a widget (button) take priority on whatever resizeing you do
on the root window dimensions.
Is there such a thing a "proportional font sizes", or do I make a statement like:
if it is 1920x1082 use size 14, if it is 1920x1200 use font size 18 ?
thx,
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
proportional fonts - by DPaul - Aug-17-2022, 05:19 PM
RE: proportional fonts - by menator01 - Aug-17-2022, 05:40 PM
RE: proportional fonts - by deanhystad - Aug-17-2022, 05:51 PM
RE: proportional fonts - by DPaul - Aug-18-2022, 05:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] PyQT Problems with multiple fonts DrakeSoft 2 1,587 Feb-21-2024, 04:30 AM
Last Post: wilkinsonwilfrid
  [Tkinter] Custom Fonts GalaxyCoyote 1 4,830 Dec-25-2019, 06:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020