Hi all,I am currently struggling with Buttons in cells defined by setting the Style property to ColumnStyle.Button.
While everything works fine regarding the technical part, I can not figure out how to overcome the following problem.
I set the ButtonAppearance.Image to an image and it is displayed fine. The problem is that the image scales and looks kind of "strange" when I have to deal with multiline columns in the related row. I fixed the with (max/min) of the column by setting it to 20px. Unfortunately the image scales its height so the image becomes higher but keeps its width.
Is there a way to deal with that? I just wan't to have a unique height/width on that image without it scaling.
Any help is kindly appreciated,
have a great dayAndy
Hi Mike,I can confirm that the image is only scaling up somehow.I know how to implement the mentioned creation filter, but I guess in this case downsizing the image (I have an easy library for that) is sufficient.
Thanks again Mike, your help is very much appreciated,cheersAndy
Hi Andy,
Ah, that makes sense. The scaling probably only scales down and never scales up. If the down-scaling is still an issue, then you could turn it off, but it would require a CreationFilter.
Hi Mike,good hearing from you, I hope everything is fine.
First of all, thanks for the sample. I checked it out and I guess I figured out the problem.I used a PNG (256x256) image for the ButtonAppearance while you use an already scaled image. My PNG scales if it is bigger than the reserved area (see attached screenshot)I resized it to 16x16 before assigning it to the appearance and now everything is fine.
Thanks a ton Mike for your great support, this one bugged me for quite a while ;)
I tried this out and I don't see any scaling happening on the image. I have attached me sample here to you can check it out. Maybe there is some property setting you are using that I am not. Or perhaps you are using an old version of the grid that had a bug?