Page 1 of 1

icon inside a gridview cell

Posted: Saturday 22nd October 2022 5:44pm
by gambafeliz
Is it possible to load an icon into a GridView cell?

Otherwise, how would they do something like that?

Re: icon inside a gridview cell

Posted: Saturday 22nd October 2022 7:04pm
by BruceSteers
Sure...
GridView1[0,0].Picture = Picture["/my/pic.png"]
http://gambaswiki.org/wiki/comp/gb.qt4/ ... ll/picture

Re: icon inside a gridview cell

Posted: Saturday 22nd October 2022 8:52pm
by gambafeliz
Perfect, thank you very much.

And it occurs to you, how to stretch the image of the cell? or do I have to fit the image to the cell space?

Re: icon inside a gridview cell

Posted: Saturday 22nd October 2022 9:36pm
by BruceSteers

GridView1[0, 0].Picture = Picture["/my/pic.png"].Image.Stretch(64, 64).Picture

' resize grid cell to fit picture
GridView1.Rows[0].Height = -1
GridView1.Columns[0].Width = -1


Re: icon inside a gridview cell

Posted: Sunday 23rd October 2022 12:16pm
by gambafeliz
Thank you Mr. You leave me amazed. +10