Rendering issue with a Listbox control running Windows 7

We have several winforms applications that contain a bunch of icons in the control ListViewas a convenient quick launch on the application side. We also have XP “visual styles” in the project build options for both, which are great for Windows XP, but we have someone who emphasizes that the elements in the control are (approximately) twice as wide in one application than the others (normal) when both run under Windows 7.

As far as I can see in the code, both lists of ListViews are added to their respective forms using the Windows Form Designer, and nothing seems to be happening with the width of the labels (etc.)

I'm a bit confused why the two apps / ListViews behave differently, and also why, it seems, I can't do anything to affect the width of the elements in ListView? What did I miss when checking the differences between a "working" script and a "non-working" script?

+3
source share
1 answer

It seems that setting the property StateImageListcauses this (even if it's the same list of images as for regular icons)

0
source

Source: https://habr.com/ru/post/1785950/


All Articles