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

Tobias Boege taboege at ...626...
Fri Oct 11 11:29:41 CEST 2013


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

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqstretch-0.0.1.tar.gz
Type: application/octet-stream
Size: 4836 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20131011/2e8af4a4/attachment.obj>


More information about the User mailing list