On Mar 20, 2009, at 4:10 AM, Michael Lange wrote:

On Thu, 19 Mar 2009 08:51:38 -0700
Tim Jones <t...@tolisgroup.com> wrote:

<snip>


You can get the DPI value on Linux using "xdpyinfo | grep resolution"
in a terminal.


You can even do this from Tk, just type:

    dpi_value = root.winfo_fpixels('1i')

(where "root" is your Tk() window) to get the currently used dpi value, or:

    root.tk.call('tk', 'scaling', '-displayof', '.', dpi_value / 72.0)

to adjust the dpi value to your needs (this should be done before creating any
widgets besides the Tk() window though).

Outstanding!  Instant scaling and our apps look correct.

Thanks for the tip, Michael.

Tim

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to