[Gambas-user] Is there a way to contrain a picturebox stretch to the original aspect?

Bruce bbruen at ...2308...
Fri Oct 11 22:22:48 CEST 2013


On Fri, 2013-10-11 at 11:29 +0200, Tobias Boege wrote:
> On Fri, 11 Oct 2013, Bruce wrote:
> > I have a picturebox within a vsplit which is in turn inside a hsplit.
> > 
> > The gist of what I need is to control the stretch so that the original
> > aspect ratio of the picture is maintained no matter which splitter they
> > expand/reduce.
> > 
> > tia
> > Bruce
> > 
> 
> I can't think of any built-in way to do that. However, you could at least
> replace the PictureBox by a DrawingArea and do the stretching manually in
> DrawingArea_Draw(). I have attached a simple project to show how it could
> be done.
> 
> Regards,
> Tobi
> 
Thanks Tobi,

That does the trick!

Bruce





More information about the User mailing list