<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 26 Aug 2021 at 15:56, bb <<a href="mailto:adamnt42@gmail.com">adamnt42@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 2021-08-26 at 07:12 -0700, Jerry Betzer wrote:<br>
> Apologies in advance if I have selected the wrong address for this e-<br>
> mail.<br>
> I am a novice Gambas user and even more novice member of this user<br>
> list.<br>
> I am looking for help working with the PictureBox class.  I got off<br>
> to a pretty quick and easy start displaying my images (.jpg files)<br>
> but I am having difficulty fitting my pictures within the picture box<br>
> container in a proportional way.  Per the<br>
> <a href="http://gambaswiki.org/comp/gb.qt4/picturebox" rel="noreferrer" target="_blank">gambaswiki.org/comp/gb.qt4/picturebox</a> link it looked like I should<br>
> use the "Mode" attribute (specifically PictureBox1.Mode =<br>
> PictureBox.Contain).<br>
> When I run my program I get the following error:<br>
> unknown symbol "Mode" in class "PictureBox"<br>
> <br>
> My OS is:  Linux Mint 18 'sarah'<br>
> 'cinnamon 64 bit'<br>
> <br>
> cat /etc/os-release yields:<br>
> NAME = "ubuntu"<br>
> VERSION = "16.04 LTS (Xenia Xerus)"<br>
> <br>
> Gambas version:  3.8.4  Â  Â  Â  Â  Â  Â  Â  Â  Â <----------------- TRUE?<br>
> <br>
> Code snippet:<br>
> Dim strMyString As String<br>
> strMyString = FileChooser1.Value<br>
> PictureBox1.Picture = Picture[strMyString]<br>
> PictureBox1.Mode = 3<br>
> <br>
> NOTE:  I have tried substituting PictureBox.Contain for the magic<br>
> number 3.<br>
> <br>
> Thanks in advance for any help.<br>
> -Jerry<br>
> ----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
You are using an incredibly old version of Gambas! (Typical Mint)<br>
I doubt whether PictureBox back then had much.<br>
Try and update to a more recent version.<br>
<br>
bruce<br></blockquote><div><br></div><div style="font-size:small" class="gmail_default">He's right that is pretty old.</div><div style="font-size:small" class="gmail_default">Try this link...</div><div style="font-size:small" class="gmail_default"><a href="https://launchpad.net/~gambas-team/+archive/ubuntu/gambas3">https://launchpad.net/~gambas-team/+archive/ubuntu/gambas3</a></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">follow the instructions "Adding this PPA to your system" to upgrade to gambas 3.16 stable.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">But you will probably find your issue it the container/panel your picture box is in.</div><div style="font-size:small" class="gmail_default">It takes a little experimentation to make sure your picture box is not in a panel that will stretch the image even if Contain is set.</div><div style="font-size:small" class="gmail_default">try setting the parent panel Arrangement to Arrange.None and Expand = false.</div><div style="font-size:small" class="gmail_default">If you are not sure if it is the panel shape set the panels background to a temporary colour to highlight it's shape.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Best of luck</div><div style="font-size:small" class="gmail_default">BruceS  (a different Bruce)</div><div style="font-size:small" class="gmail_default"><br></div></div></div>