Skip to main content
A newer version of this page is available. .

TdxForm.UpdateImageLists Method

Replaces assigned DPI-aware image lists with the corresponding lists whose content is designed for a different monitor DPI value.

Declaration

procedure UpdateImageLists; virtual;

Remarks

This function replaces all TcxImageList components assigned to published properties of all controls on the form with different TcxImageList components containing images designed for a different target DPI value corresponding to the form’s new scaling factor. The UpdateImageLists procedure uses component names to identify the corresponding image lists with images designed for a specific target DPI. The replacement list’s name must include the original image list’s name with the appended target DPI value. The UpdateImageList procedure iterates through the list of standard DPI values to find an image list with the name including the value nearest to the target DPI.

This procedure is automatically called by the ScaleFactorChanged procedure every time the application receives the WM_DPICHANGED system message. As with ScaleFactorChanged, you can override the UpdateImageLists procedure in a descendant form to perform custom actions instead of replacing image lists on the form according to the described algorithm.

Note

If the dxAutoReplaceImageListReferencesOnDPIChanges global variable is set to False, calling the UpdateImageLists procedure has no effect.

See Also