Rendering issue with the Listbox control under Windows 7
We have a couple of winforms applications that host a bunch of icons in a ListView
control as a handy quick launch down the side of the applications. We also have "XP visual styles" enabled in the project build options for both which works great for Windows XP, but we've had someone highlight that the items in the control are (roughly) twice as wide in one application as the other (normal) when both are run under Windows 7.
As far as I can see in code, both ListViews are added to their respective forms using the windows forms designer, and there doesn't appear to be anything fiddling with the width of the labels (etc.)
I'm a little confused why the two applications/ListViews are behaving differently, and also why there doesn't seem to be anything I can do to affect the widt开发者_如何学Ch of the items in the ListView
? What have I missed when checking for differences between the "working" scenario and the "non-working" scenario?
It appears that setting the StateImageList
property causes this (even if it is the same image list as used for the normal icons)
精彩评论