I made a container control with 20 lines of different controls (a label, a textarea, a listbox and 2 buttons) , the problem is that the container control is quite big and i need to be able to scroll within but i have no idea how to do that, i see that in the canvas it has a scroll method but i can embed other controls in it ?
So i have the container control within a window, i have to be able to scroll in the container control to be able to see all the lines in my case.
If you would enable the MouseWheel for the Container, add this to “MyContainerControl”
Function MouseWheel(X As Integer, Y As Integer, DeltaX as Integer, DeltaY as Integer) As Boolean
if ScrollBar1.Value >= 0 and ScrollBar1.Value <= ScrollBar1.Maximum then
ScrollBar1.Value = ScrollBar1.Value-DeltaY
end if
End Function
Thanks a lot, the first part works like a charm, i had to put the container control in a page panel to create the box effect so that it does not scroll on the whole window , i`ll put as well the scroll on the mouse to see how it goes.