Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing object scroll to form scrollbars
Message
De
14/12/2007 07:41:57
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
14/12/2007 04:50:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01275505
Message ID:
01275809
Vues:
28
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  &&Down
>    nTop = this.viewporttop + this.vscrollsmallchange
>else &&Up
>    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.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform