RE: ListView, unstable image size
- From: Dud Vickers <DudVickers@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Mar 2009 23:43:01 -0700
"Dud Vickers" wrote:
I have a Visual Studio VB application (version 8.0) with a ListView set to
display large icons.
The tile size is 201,124 and the image size which was initially 43,124 is
now 63,124
I can load images to the ImageList and then load this to the ListView, with
the image showing the correct size; as I load more images, the scroll bar
appears which allows me to scroll through all of the images.
At this point, quite randomly, the images will either be of the correct size
63,124 or a narrower size closer to the original size of 43,124. When
selected, a narrow image always reverts to the correct new size.
As well as loading the images I am also loading and displaying the image
name under the image. This loads correctly and always shows the full image
name. The use of a tile size larger than the image size allows the displayed
image name to take up more width than the actual image.
The ImageList and the ListView are both left unsorted, with the images being
sorted before being loaded to both of these objects. Also, both of these are
totally cleared before a new image is added; the new sorted array is then
loaded to these objects.
I have searched the project to see if the original image size is buried
somewhere in the code or the designers but cannot find it.
Has anybody else encountered this, is it a bug, or is there somewhere that
the old size may be hidden?
Update:
While working with the code today, I realised that the image height is
always correct but the image width is clipped, displaying only part of the
left side of the image. The actual width of the displayed portion of the
image varies from 100% down to about 60%. The image is cut, not stretched to
fir the visible portion of the image.
Dud Vickers
.
- References:
- ListView, unstable image size
- From: Dud Vickers
- ListView, unstable image size
- Prev by Date: DataGridView - Printing
- Next by Date: RE: DataGridView - Printing
- Previous by thread: ListView, unstable image size
- Next by thread: DataGridView - Printing
- Index(es):
Relevant Pages
|