[Gambas-user] SVG files in file browser filter

Benoît Minisini g4mba5 at gmail.com
Thu Apr 8 04:30:35 CEST 2021


Le 08/04/2021 à 02:20, John Anderson a écrit :
> Using Gambas 3.15.2 on Linux Mint 20.1 Cinnamon - when I place a picture 
> box on a form and I want to load in an svg file from my image dataset - 
> the file browser filter for image files is missing *.svg.  It works ok 
> when I set the file browser filter to "All Files" - then I can select 
> the svg file and all works just fine; the svg image is handled properly.
> 
> I know it's just an extra click to make it work, just wondering if it is 
> intentional that svg files are not included in the image file filter?  
> Maybe the file filter needs a tweak on a future release?
> 
> Thanks
> 
> -John
> 

SVG files are not supported by the PictureBox control, and any of the 
other Picture properties.

It's the underlying GUI toolkit that transforms the SVG file into a 
bitmap image with an arbitrary size.

If you want to load a SVG file into a PictureBox, you have to load the 
file manually with the SVGImage class, and then convert it to an image 
or a picture.

I may add support for SVG files in the future.

Regards,

-- 
Benoît Minisini


More information about the User mailing list