Mouse Wheel in container control

My mouseWheel is working well in a container control. It changes a scrollBar value.
However, there is a textArea in the container. The Wheel is ignored over the textArea until I click beside the textarea. This activates the mouse Wheel over the textArea.

Which property is exactly changed by this mouse click? It doesn’t seem to be a focus issue.

I’d like to activate it properly at Init.

When the TextArea has the focus, it gets the mouseWheel event. If you implemented the mouseWheel event handler in the TextArea, try not to return true. With some luck, it should pass the event to the CC.

If that is not the case, create a method in the CC to handle the mousewheel such as

MouseWheelHandler(X as Integer,Y as Integer, DeltaX as Integer, DeltaY as Integer) As Boolean

Then put the code you currently have in the CC mouseweheel handler in that method, and put this in the original mousehandler, as well as the TextArea MouseWheel handler :

Return MouseWheelHandler(X,Y,DeltaX, DeltaY)

That way you can process mousewheel events from either places.

I see what you are saying. That would work perfectly.
However, there seems to be another way.
When I click the cc besides the TextArea the Wheel is passed on to the CC. It changes it’s behavior for good, regardless if the TextArea has the focus or not.

Is there any way to get this state without the user clicking?

I should really refrain from trying to help. Sorry :confused: