Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
25
Display of Images in UltraListView is Slow
posted

Hi,

It seems that the display of my UltraListView is much slower when I include an image from an image list with each of my items.  In my case, the time it takes to display the list is approx. 4 times longer when I include an image from the image list as compared to when each item uses the default image (or no image). Below is a code snippet:

// Create image list for UltraListView that has 5 images

myacqsList.ViewSettingsDetails.ImageList = new ImageList();

myAcqsList.ViewSettingsDetails.ImageList.Images.Add(new icon(...));

myAcqsList.ViewSettingsDetails.ImageList.Images.Add(new icon(...));

myAcqsList.ViewSettingsDetails.ImageList.Images.Add(new icon(...));

myAcqsList.ViewSettingsDetails.ImageList.Images.Add(new icon(...));

myAcqsList.ViewSettingsDetails.ImageList.Images.Add(new icon(...));

 

// Set default image and image size

myAcqsList.ItemSettings.DefaultImage = new icon(...).ToBitmap();

myAcqsList.ViewSettingsDetails.ImageList.ImageSize = new System.Drawing.Size(16,16);

myAcqsList.ViewSettingsDetails.ImageSize = new System.Drawing.Size(16,16);

 

// Add an item to the list

...

...

string name = ...;

DataTime data = ...;

string acqID = ...;

UltraListViewSubItem reportSubItem = new UltraListViewSubItem();

UltraListViewSubItems[] subItems = { new UltraListViewSubItem(acqID, null), new UltraListViewSubItem(date, null), reportSubItem };

UltraListViewItem = new UltraListViewItem(name, subItems);

item.Appearance.Image = imageIndex;    // assign correct index from image list.

item.Appearance.ImageHAlign = Infragistics.Win.HAlign.Left;

item.Appearance.ImageVAlign = Infragistics.Win.VAlign.Middle;

myAcqsList.Items.Add(item);

...

...

If I comment out the assignment to the Image so that the default image is used, the display is much faster. Alternatively, if I assign -1 as the image index, as shown below, so that no image is displayed the display is also much faster.

item.Appearance.Image = -1;

I'm using version 8.2 of the Infragistics Windows DLLs, so they are a little old. 

Any idea why including an image from the image list would cause the display of the list view to be so much slower? Any help is appreciated.

Thanks,

Rob