how make mouse wheel values?

hi i try to know how get values from the mouse wheel i want set values
into a variables but i dont know how get the +/- values i'm going
well?

self.wheelFValue = self.fordward = 0
        self.wheelBValue = self.backward = 0

self.Bind(wx.EVT_MOUSEWHEEL, self.OnWheel)

def OnWheel(self, event):

        #rt = self.GetWheelRotation()
        if self.wheelFValue == 1:
            self.GetWheelRotation() + self.fordward + 1
        else:
            self.GetWheelRotation() - self.backward - 1

        rt = self.GetWheelRotation()

something like that in mind

http://www.wxpython.org/docs/api/wx.MouseEvent-class.html#GetWheelRotation

I just reset the GetWheelRotation values to just UP or DOWN like this:

        direction = -1
        if evt.GetWheelRotation()>0:
            direction = 1

After this you can use the the direction:

someValue += direction*stepValue

···

On Sun, Mar 20, 2011 at 12:26 AM, Boštjan Mejak <bostjan.mejak@gmail.com> wrote:

wxPython API Documentation — wxPython Phoenix 4.2.2 documentation

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
There is NO FATE, we are the creators.
blog: http://damoc.ro/