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
1105
UltraGridCell appearance.image sizing
posted

I have a column where I'm setting an image in the appearance of the cell (i.e. cell.Appearance.Image =)  Not every cell in the column will have the same image, but all images are of the same size.  Call this Column A.

At the same time, another column contains images via the cell value being of System.Drawing.Image.  The size of the image in this column will always be larger (both height and width) than the image in the other column.  Call this Column B.

I have RowSizing set to fixed because I don't want the user to be able to resize rows.  However, in the InitializeRow method, I examine the size of the image in Column B (if it exists, it doesn't have to unlike column A).  I then set the row size to be the height of the image in column B.

The problem I have is that the size of the image in column A grows to the height of the row, and I don't want it to.  I want it to maintain the same size no matter how the row is sized.

I've looked into using a draw filter to manually set the rect of the ImageUIElement.  But it seems to disregard my sizes when the row gets resized.

Essentially what I need is for the ImageUIElement to not autosize itself (which it appears to do) when the row resizes.

Any help would be appreciated.  Thanks!

 

Chris Rowland

Parents Reply Children
No Data