Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tk scaling

82 views
Skip to first unread message

paul...@googlemail.com

unread,
Dec 17, 2018, 3:14:57 PM12/17/18
to
Hi,

I want to change the size of a Tk GUI to take into consideration screen DPI. After an internet search I've tried:

tk scaling -displayof . 1.25

I've changed the 1.25 to various settings, but my simple test GUI doesn't change size as I expected.

Is there anything else that I need to do to use this command to change a GUI's size?

Currently I'm trying this on a Debian Linux machine.

Thx.

Brad Lanam

unread,
Dec 17, 2018, 6:07:22 PM12/17/18
to
tk scaling has to be set before anything is drawn.

And also if your fonts are specified as pixel sizes, they will stay that size.

briang

unread,
Dec 17, 2018, 7:44:50 PM12/17/18
to
On Monday, December 17, 2018 at 3:07:22 PM UTC-8, Brad Lanam wrote:
> tk scaling has to be set before anything is drawn.
>
> And also if your fonts are specified as pixel sizes, they will stay that size.

More specifically, it has to be set before any fonts are loaded. It only affects font size.

-Brian

Brad Lanam

unread,
Dec 17, 2018, 7:52:37 PM12/17/18
to
No. It affects sizes that are specified in points, mm, etc.
e.g. entry .e -borderwidth 5pt
Not just fonts.

briang

unread,
Dec 17, 2018, 11:36:36 PM12/17/18
to
Yes, but if the widget sizes are in pixels, there's no affect by the change in tk scaling, which is usually the default situation.

-Brian
0 new messages