[Gambas-user] PictureBox

bb adamnt42 at gmail.com
Thu Aug 26 16:55:41 CEST 2021


On Thu, 2021-08-26 at 07:12 -0700, Jerry Betzer wrote:
> Apologies in advance if I have selected the wrong address for this e-
> mail.
> I am a novice Gambas user and even more novice member of this user
> list.
> I am looking for help working with the PictureBox class.  I got off
> to a pretty quick and easy start displaying my images (.jpg files)
> but I am having difficulty fitting my pictures within the picture box
> container in a proportional way.  Per the
> gambaswiki.org/comp/gb.qt4/picturebox link it looked like I should
> use the "Mode" attribute (specifically PictureBox1.Mode =
> PictureBox.Contain).
> When I run my program I get the following error:
> unknown symbol "Mode" in class "PictureBox"
> 
> My OS is:  Linux Mint 18 'sarah'
> 'cinnamon 64 bit'
> 
> cat /etc/os-release yields:
> NAME = "ubuntu"
> VERSION = "16.04 LTS (Xenia Xerus)"
> 
> Gambas version:  3.8.4                   <----------------- TRUE?
> 
> Code snippet:
> Dim strMyString As String
> strMyString = FileChooser1.Value
> PictureBox1.Picture = Picture[strMyString]
> PictureBox1.Mode = 3
> 
> NOTE:  I have tried substituting PictureBox.Contain for the magic
> number 3.
> 
> Thanks in advance for any help.
> -Jerry
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
You are using an incredibly old version of Gambas! (Typical Mint)
I doubt whether PictureBox back then had much.
Try and update to a more recent version.

bruce



More information about the User mailing list