[Gambas-user] About the origin of Stock Icons

Jorge Carrión shordi at gmail.com
Mon Feb 20 18:35:20 CET 2023


El lun, 20 feb 2023 a las 18:21, Fabien Bodard (<gambas.fr at gmail.com>)
escribió:

> The other way :
>
> Store the pictures in an array of picture
> private  $aPicture as new picture[]
> private $aNames as new string[]
> for each s...
>
>   $aPicture.Add(...)
>   $aNames.Add(s)
> next
>
> then fill the listview with the array
>
> for i = 0 to $aPicture.max
>
>   listview.add( $aNames[i], $aNames[i], $apicture[i])
>
>
> next
>
> to get the item from the picture ?
>
> $aNames[$aPicture.Find(ListView1.Item.Picture)]
>
>
> Well it is not really useful :)
> synonym of
> ListView1.Item.Key
>
> Some
Something like that I've tried already, but using a collection...

The basic idea is:
Starting from any project (ours or made by others) that uses controls with
stock icons, go through the controls class and to all the controls that
have a Picture property, obtain the name of the assigned Picture.
So, if our "Decorator" class has an image of the same name, replace it.

 Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230220/73084f57/attachment-0001.htm>


More information about the User mailing list