[Gambas-user] Need help with resizing Picutre contained by a resizable scrollview
Benoit Minisini
gambas at ...1...
Mon Apr 7 22:37:10 CEST 2008
On dimanche 6 avril 2008, B. Jack wrote:
> I am having trouble with resizing images to resized parents because the
> image size units are not the same as the window/form size units.
What are you talking about? Everything is in pixels. Or maybe you want to talk
about the fact that control dimensions are, by default, multiples of
Desktop.Scale and not absolute pixels values? If you don't want this
behaviour in a specific form, you just have to change the "(Scaled)"
property.
>
> I have a form with various V-Slide and H-Slide partitioned child objects.
> The image preview pane is a child of a scrollview (so large images may be
> panned). This scrollview is ultimately a child of one of the
> VSliders/HSliders on the form.
>
> What I need to do is have a Picture within the scrollview that centers any
> image smaller than the client area after any Arrange activity. For any
> image larger than the client area the Picture object is maximized to the
> image size so the ScrollView will make the image pannable. The problem
> with just setting the Extend attribute is then that a larger image will be
> cut off (and won't be scrollable). Trying to set the H and W (or Width and
> Height) of the child Picture in an Arrange handler also doesn't seem to
> work right since the unit size of the image in the Picture and the Parent
> container do not correlate.
>
> Is the only option to set the stretch attribute and have it chunky-scaled?
>
Can you send your project? All that is not very clear for me...
--
Benoit Minisini
More information about the User
mailing list