[Gambas-user] Having a bit of trouble with ImageView ZoomfFit

Cedron Dawg cedron at exede.net
Tue May 14 15:12:21 CEST 2019


I've been working with the ImageView control in my most recent project.  Perfect tool for what I am using it for, I doff my cap.

This code works as you wanted as well:

' Gambas class file

'=============================================================================
Public Sub Form_Activate()
    
        ImageView1.Image = Image.Load("~/Pictures/Wallpaper1920/Squirrel1920.JPG")
        Form_Resize()

End
'=============================================================================
Public Sub Form_Resize()

        ImageView1.Move(0, 0, Me.W, Me.H)
        ImageView1.ZoomFit(0)

End
'=============================================================================

The difference is in the Activate vs the Open for the Form.  I got the same behavior you described there.

Ced



More information about the User mailing list