Scrollview question
Posted
#1
(In Topic #786)
Regular

If I place a control (a button say) in a scrollview container with it's .X value greater than scrollview.W then the horizontal scrollbar is initiated and the control can be brought into view.
However if the .X position of the control is less than scrollview.X then the scrollbar is not initiated.
In other words, a child object to the right of the scrollview can be viewed whereas a child object to the right cannot.
Is this to be expected?
Posted
Guru

bill-lancaster said
I've only just noticed this.
If I place a control (a button say) in a scrollview container with it's .X value greater than scrollview.W then the horizontal scrollbar is initiated and the control can be brought into view.
However if the .X position of the control is less than scrollview.X then the scrollbar is not initiated.
In other words, a child object to the right of the scrollview can be viewed whereas a child object to the right cannot.
Is this to be expected?
Probably the scrollview.Arrange setting
Arrange.None will give freedom to place objects where you expect them to be and make scrollbars work as expected i should think.
and i don't get this …
In other words, a child object to the right of the scrollview can be viewed whereas a child object to the right cannot.
Posted
Regular

I thought I'd make it clearer with the last statement, unfortunately it should read:-
In other words, a child object to the right of the scrollview can be viewed whereas a child object to the LEFT cannot.
Posted
Regular

Perhaps you might try this:-
Code
Public Sub Form_Open()
Dim hScrollview As New ScrollView(Me)
With hScrollview
.X = 10
.Y = 10
.W = 500
.H = 500
End With
Dim hFrame As New Frame(hScrollview)
With hFrame
.X = -100
.Y = -10
.W = 200
.H = 200
End With
Dim hFrame2 As New Frame(hScrollview)
With hFrame2
.X = 450
.Y = 50
.W = 200
.H = 200
End With
End
Thanks
Bill
Posted
Guru

You cannot use negative numbers.
the box has been placed -100 to the scrollview.X 0 position so it's right.
you should place the frame at 0 and scroll the view +100 to get the same effect.
like this is how i'd do it ..
Code (gambas)
Posted
Regular

Thanks again,
Bill
Posted
Guru

1 guest and 0 members have just viewed this.


