[Gambas-user] Stretching an image As Image
Tobias Boege
taboege at ...626...
Sat Sep 29 18:58:10 CEST 2012
On Sat, 29 Sep 2012, Ru Vuott wrote:
> Hello,
>
> I'ld like to insert an image into a gridview cell.
> Since the image is larger than the cell, I would like to reduce it by "stretching":
>
> *******
> Public Sub .........()
>
> Dim p As Picture
> Dim i As New Image
>
> i = i.Load("my_image")
>
> With GridView1[0, 0]
> i.Stretch(.W, .H)
> p = i.Picture
> .Picture = p
> End With
>
> .........
>
> End
> ************
>
> but the image is not stretched ! Why ?
>
> Thanks
> vuottt
Have a look at the exact signature of Image.Stretch():
Function Stretch ( Width As Integer, Height As Integer ) As Image
It is not a method in the common sense in that it modifies the object it is
called on but it instead *returns* a new stretched version of that object.
Regards,
Tobi
More information about the User
mailing list