[Gambas-user] Need help with resizing Picutre contained by a resizable scrollview

B. Jack gau_veldt at ...67...
Tue Apr 8 01:17:06 CEST 2008


It's off by more than a few border pixels.  The code tends to end up with something around double the area than the actual image (so an image always scrolls quite a bit even if it should fit in the window) but it's not exactly double and the difference changes if I load the project on different machines running the IDE (I'm thinking different X Windows DPI settings or something is going on and changing the units).

> From: gambas at ...1...
> To: gambas-user at lists.sourceforge.net
> Date: Tue, 8 Apr 2008 00:42:27 +0200
> Subject: Re: [Gambas-user] Need help with resizing Picutre contained by a resizable scrollview
>
> On mardi 8 avril 2008, B. Jack wrote:
>> Hotmail has a tag bug... it truncated some of my pseudocode:
>>
>> Then what I want to do is have the size and position of Picture1 in an
>> Arrange handler such that: when Picture1.Image.W < ScrollView1.W move
>> Picutre1 so that Picture1.X=Int(ScrollView.W - Picutre1.W / 2) when
>> Picture1.Image.W>= ScrollView1.W set Picture1.X=0
>> when Picture1.Image.H < ScrollView1.H move Picutre1 so that
>> Picture1.Y=Int(ScrollView.H - Picutre1.H / 2) when Picture1.Image.H>=
>> ScrollView1.H set Picture1.Y=0
>>
>> < is escaped so it doesn't truncate again
>>
>
> You must use ScrollView1.ClientW and ScrollView1.ClientH to get the dimension
> of the contents of the ScrollView1. Otherwise you will get the border, if you
> defined a border of course.
>
> Regards,
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

_________________________________________________________________
Try Chicktionary, a game that tests how many words you can form from the letters given. Find this and more puzzles at Live Search Games!
http://g.msn.ca/ca55/207



More information about the User mailing list