RE: ListView, unstable image size

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





"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
.



Relevant Pages

  • Re: Paging Data
    ... your stored procedure (which is, at least imho, the preffered way, using the ... as oposed to having to load all data first. ... > records are displayed almost instantaneasly, but only chunks at a time. ... > displaying them. ...
    (microsoft.public.dotnet.framework)
  • Re: Check/Unchek in PopUp Menu -- Tick mark is not toggleing
    ... > I am displaying a Pop Up menu on right click of List Control's ... > This popup menu is having Check/Tick marks. ... you load the menu again and display it. ... modifying it in memory, ...
    (microsoft.public.vc.language)
  • Re: Site does not display properly in IE
    ... except for the size of the images, which does change your spacing. ... IE tries to load ... Publisher will resize and resample your ... And then you need to be sure you are displaying them at 100% ...
    (microsoft.public.publisher.webdesign)
  • Re: Check/Unchek in PopUp Menu -- Tick mark is not toggleing
    ... > I am displaying a Pop Up menu on right click of List Control's ... > This popup menu is having Check/Tick marks. ... you load the menu again and display it. ... modifying it in memory, ...
    (microsoft.public.vc.mfc)
  • tile and vista
    ... I am using ActiveTcl 8.5.0.0 Beta 7 and tile on Vista and the WinXP theme is ... displaying OK and by default. ... I have just download tclkit8.5a6.exe from: ... tile open with the Win2000 theme. ...
    (comp.lang.tcl)