Hi Rolf,

Square PictureBox is correct.
Stretched has to be set to false.
Then just set Alignment to Center (in code: 3).
That's all.

Matti

Am 15.03.2012 10:14, schrieb Rolf-Werner Eilert:
> Hi folks, this is in Gambas2:
>
> On a form, I have a PictureBox which shall show photos in landscape and
> portrait. So I drew a square PictureBox.
>
> I expected that if the photo has not the same aspect ratio, it will be
> shown with bars of the background color, but when I say Stretched =
> True, the picture will be shown as fitted into the complete PictureBox.
>
> Is there any way to avoid this? Or is the only way to achieve an aspect
> ratio correct display, changing the PictureBox's Height and Width?
>
> Thanks for your answers.
>
> Rolf

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to