[Gambas-user] ImageView Scrollbars hide if not required?
Charlie Ogier
charlie at cogier.com
Tue Nov 3 18:32:00 CET 2020
K., The code below works for me: -
Benoît, Lower the value of 'iExtra' to see the problem
Charlie
'*****************************************
ImageView1 As ImageView
Public Sub Go()
Dim iExtra As Integer = 2 ''On my system anything below 2 will show
the scrollbar(s)
ImageView1.Image = Picture["icon:/256/wizard"].Image
Me.Height = ImageView1.ScrollHeight + iExtra + (Me.padding * 2)
Me.Width = ImageView1.ScrollWidth + iExtra + (Me.padding * 2)
End
Public Sub Form_Open()
With Me
.H = 50
.W = 50
.Arrangement = Arrange.Vertical
.Padding = 5
End With
With ImageView1 = New ImageView(Me) As "ImageView1"
.Expand = True
End With
Go
End
'*****************************************
On 03/11/2020 16:27, Benoît Minisini wrote:
> Le 03/11/2020 à 16:15, KKing a écrit :
>> If I resize the form large enough I don't want applicable ImageView
>> scroll bar to appear e.g. Horizontal.
>> I have the following
>> If (Me.W > (intImageWidth)) Then
>> ImageView1.W = intImageWidth
>> Else
>> ImageView1.W = (Me.W)
>> Endif
>> But if I resize form wider than the image I still end up with a
>> horizontal scroll bar and very minor amount of scrolling.
>> K.
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> Please post a project that reproduces the problem.
>
> Regards,
>
More information about the User
mailing list