Reputation: 31513
I can get the screen resolution in with
wx.DisplaySize()
but I don't see a method which gives me the DPI.
Upvotes: 2
Views: 1669
Reputation: 1611
An easier solution may be:
import wx
app = wx.App(0)
print wx.ScreenDC().GetPPI()
I tested it on Windows XP and it indeed prints (96, 96) with the default DPI-setting and (120, 120) with 120 DPI-setting.
Upvotes: 2
Reputation: 88757
I don't think there is any such function in wxPython, what you can do instead is, by using ctypes call win32api function GetDeviceCaps and get LOGPIXELSX/LOGPIXELSY
Upvotes: 0