Let's say I have to display green button icon for column value "1", yellow for column value "2" and red for "3" . I have two requirements
1. Column shows both value and its associated icon. ie. Column value shows "1" <green button icon>, "2" <yellow button icon>, "3" <red button icon>
2. Columns shows only the icon representing the value
Questions:
a. From reading the forum, valuebasedappearance seems to help me achieve both requirements very easily. Is that correct?
b. How would I achieve sorting of the columns in requirement #1 and requirement #2 ?
Stretching of the image is not the same issue at all. The original issue reported in this thread has to do with the corruption of the colors of the image.
I beleive there were some changes made to the sizing of images in a cell so that images maintain their aspect ration when they are resized. If this is causing a problem, you should Submit an incident to Infragistics Developer Support so they can check it out.
Ok, I've the same problem with images of all valuelists in all grids in my project since I've made the upgrade to hotfix version 8.2.20082.2121.
If I set an Image, for example, in the field ValueListItems(0).Appearance.Image = My.Resource.SomeImage the result image appears like streatched and don't mantein his original sizes.
Notice that i've not used the imagelist, but simply an image that is in My.Resource
I resolved by filling the properties ImageBackground instead of Image, with field ImageBackgroundStyle setted to "Centered".
But I've created many grid that use Image field to specify an image, and worked fine before the hotfix upgrade.
There is a way to solve my problem? There is some properties that can set the style of an Image (not an ImageBackground)?
Thank you in advance
Hey vrn,
I took Mikes advise and did some testing around the imagelist corruting the images. It appears when the bitdepth is changed from 8 to 32 it has buggered the image. I deleted the images and added them back into the imagelist already set to 32 bit depth first.
Seems to have sorted it out.
Cheers,John
Hi John, did you find out the reason for the distortion? How did you resolve it? Please post some code if possible.
Thanks!
Also, if your images have an alpha channel, then they might not work in DotNet. Check out this link:
822488 - BUG The Icon That Is Displayed on the Control Loses the Alpha Channel When You Set the Image Property of a Microsoft Windows Form Control to a 32-Bit Alpha-Blended Icon