[Gambas-user] About the origin of Stock Icons

Gianluigi gradobag at gradobag.it
Mon Feb 20 11:18:44 CET 2023


Il 20/02/23 10:33, Gianluigi ha scritto:
> 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
>
>

There is something that escapes my understanding if I write:

If Application.DarkTheme Then
       hImage = Stock["24" &/ sIcon].Image
       hImage = hImage.Invert()
...
I get from the invert the void image error ...

Regards

Gianluigi



More information about the User mailing list