ListView: Image shift when using StateImageIndex

210 views Asked by At

At the moment, I'm experiencing a very weird bug/glitch with ListViews in Details-View with a SmallImageList and a StateImageList: Whenever I add an item and set the ImageKey and the StateImageIndex to a value, it will display the state image fine, but the "normal" image of the item is strangely shifted upwards, and a bit of the next image in the ImageList becomes visible.

How do I get rid of this and display my icon properly? Did anyone experience something like this before?

The SmallImageList contains flags of the size 16x11. The problem does not occur if I remove the StateImageList.

Here's a screenshot of the result with both State -and SmallImageList enabled: A screenshot of the result

1

There are 1 answers

0
chesta On BEST ANSWER

The SmallImageList and the StateImageList had different image sizes: 16x11 and 16x16. This caused the ListView to fill in the "gap" with the next flag.

I fixed it by adjusting the StateImageList Image Size to 16x11. Everything works fine now.