[Gambas-user] About the origin of Stock Icons

Gianluigi gradobag at gradobag.it
Mon Feb 20 10:33:22 CET 2023


Il 20/02/23 10:06, Fabien Bodard ha scritto:
> Hello ...
>
> this is the workaround ... in fact icons exist but are on the same 
> color than the background... at least on mint.
>
> so :
>   For Each sIcon In Stock.Icons
>     hPic = Stock["24" &/ sIcon]
>     If Application.DarkTheme Then
>       IconView1.Add(sIcon, sIcon, hPic.Image.Invert().Picture)
>     Else
>       IconView1.Add(sIcon, sIcon, hPic)
>     Endif
>   Next
>
> I know .. this is not perfect because even colored icons are inverted 
> ... but at least you will see that all icons are well returned

Hi Fabien,

unfortunately, the code:

IconView1.Add(sIcon, sIcon, hPic.Image.Invert().Picture)

returns me "not an object" probably from the conversion to image but I 
can't figure out why

Thank you very much for the suggestion and participation, I knew you 
would not disappoint us :-)

Gianluigi



More information about the User mailing list