TdxCustomForm.UpdateImageLists Method
Deprecated. Replaces assigned DPI-aware image lists with corresponding lists whose stored bitmaps are designed for a different monitor DPI value.
Declaration
procedure UpdateImageLists; virtual;
Remarks
The ScaleFactorChanged procedure calls the UpdateImageList
procedure every time the application receives the WM_DPICHANGED
[1] system message. An UpdateImageList
call replaces all TcxImageList components with a different set of TcxImageList components whose stored bitmaps target a different target DPI.
Tip
This image list replacement technique is deprecated. We recommend that you use only SVG images as UI icons in projects that target multi-monitor mixed-DPI environments.
The UpdateImageLists
procedure uses component names to identify corresponding image lists whose stored bitmaps are designed for a specific target DPI. The procedure iterates through the list of standard DPI values to find an image list whose name includes the value closest to the target DPI.
For example, you can create four image lists and populate them with UI icons designed for the following DPI values:
Source DPI | Scale Factor | Bitmap Dimensions |
---|---|---|
96 |
100% (unscaled) |
16x16 |
120 |
125% |
20x20 |
144 |
150% |
24x24 |
192 |
200% |
32x32 |
You can override the UpdateImageLists
procedure in custom TdxCustomForm class descendants to execute custom actions when the form’s scale factor changes.
Limitations
An UpdateImageLists
procedure call has no effect if the dxAutoReplaceImageListReferencesOnDPIChanges global variable is set to False
.