Event sent when the display scale factor or pixel density (measured in dots-per-inch, or DPI
) of the monitor a window is on changes.
The event is sent to each wx.TopLevelWindow affected by the change, and all its children recursively (post-order traversal). For example, this event is sent to the window when it is moved, by the user, from a display using some DPI
value to another display using a different DPI
value. It also sent to all program windows on the given display if its DPI
changes due to a change in the system settings.
Currently this event is generated by wxMSW port if only and only if the MSW application runs under Windows 10 Creators Update (v1703) or later and is marked as being “per-monitor DPI
aware”, i.e. contains a dpiAwareness
tag with the value “PerMonitorV2” in its manifest (see Microsoft “Application Manifests” documentation for more details).
Handlers bound for the following event types will receive a wx.DPIChangedEvent parameter.
EVT_DPI_CHANGED: Process a wxEVT_DPI_CHANGED
event.
New in version 4.1/wxWidgets-3.1.3.
Note
Per-monitor DPI
support is an experimental feature that is still in development. It might not work correctly for some controls.
See also