Hello Thanks Michael for the suggestions.
I tried inserting root.tk.call('tk', 'scaling', '-displayof', '.', root.winfo_fpixels('1i') / 72.0) before adding any children to the root. I also tried using negative size value ("Times -8 bold") as suggested. Neither of the two made any difference on a Mac. It still looks the way as shown in attachment. Any more suggestions on how to correct this issue will be really appreciated. regards Bhaskar Chaudhary On 2/11/14, Michael Lange <klappn...@web.de> wrote: > Hi, > > On Tue, 11 Feb 2014 14:49:31 +0530 > Bhaskar Chaudhary <bha100...@gmail.com> wrote: > >> Hi >> >> The following piece of code displays correctly on Windows PC but it >> displays all messed up in OS X (10.9.1 and others) as shown in >> attachment below. > (...) >> >> Any reasons why it shows the way it does on Mac. >> Thanks. >> > > I think "all messed up" is a little harsh for the mac screenshot ;) > Just a guess: the difference in the appearance of the border and the > font might be caused by a different dpi value in use by your windows and > OSX systems. You can check the respective values by adding the line > > print 'DPI value: %f' % root.winfo_fpixels('1i') > > to your example. > You can even force your application to use a custom dpi value, if you do > > root.tk.call('tk', 'scaling', '-displayof', '.', dpi_value / 72.0) > > _before_ creating any of root's child widgets. > > As far as the font size is concerned, you can use pixel sized fonts to > minimize the risk of your font appearance getting spoiled by dpi > settings; to do so simply use a negative size value, as in > "Times -8 bold". > > Regards > > Michael > > > .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. > > Our way is peace. > -- Septimus, the Son Worshiper, "Bread and Circuses", > stardate 4040.7. > _______________________________________________ > Tkinter-discuss mailing list > Tkinter-discuss@python.org > https://mail.python.org/mailman/listinfo/tkinter-discuss >
<<attachment: PastedGraphic-1.png>>
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss