Srdjan,
what happens if you are not over an object?
My advice would be:
-BINDEVENT to all visible controls. Do it in Init with some iteration. This is much easier if you add an extra control.
-put an extra control over all containers wich could not receive a mousewheel, send it to background, bound it to your forms _MouseWheel. (a shape with backstyle,bordestyle=0 will do)
Agnes
>
>Paying it forward, here is final result;
>From object.MouseWheel I simply call
>form method parsing directly all parameters which mousewheel normaly receives;
>
>
>**Any Object MouseWheel method
>lparameters nDirection, nShift, nXCoord, nYCoord
>thisform.ObjMouseWheel(nDirection, nShift, nXCoord, nYCoord)
>
>
>
>**Added Form Method ObjMouseWheel
>lparameters nDirection, nShift, nXCoord, nYCoord
>local nTop
>if nDirection < 0
> nTop = this.viewporttop + this.vscrollsmallchange
>else
> nTop = this.viewporttop - this.vscrollsmallchange
> if nTop < 0
> nTop=0
> endif
>endif
>this.setviewport(this.viewportleft,nTop)
>
>
>
>And form scrolls like object is not present at all :))
>
>
>Thks+++ Again :)
>
>
>
>
>
>>
>>>>Hi Srdjan,
>>>>
>>>>Create a Method of the form like "_MouseWheel"
>>>>
>>>>Bound all Mousewheel events via eventbinding (You might iterate throug .CONTROLS) to this Method
>>>>
>>>>The Method must recieve the Parameters of the Mousewheel Event(s)
>>>>
>>>>
>>>>Now you need the calculate the direction and use
.SETVIEWPORT() to place the viewport
>>>
>>>
>>>
>>>Hi Agnes,
>>>
>>>Great !
>>>I saw properties ViewPort.h/w/l/t but overlooked completely
>>>method wich does almost EXACTLY what I need in this case.
>>>
>>>Will manage from here easily :)
>>>Thks+++
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]