ScrollBar control for ContainerControl within a window

Greetings,

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.

Any idea how to do that ?

Thanks .

add a ScrollBar
set Maximum to Container.Height-Scrollbar.Height;
activate LiveScroll
add EventHandler “ValueChanged”
add to event:

MyContainerControl.top = 12-me.Value

// Where 12 is the top of MyContainerControl

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.

Thanks again.