wxGtk listctrl in report mode : mouse-scroll-wheel and Scrollist

Hi,

On wxGtk there is no support for a mouse-scroll-wheel, or for Scrollist.
Are those bugs in wxWidgets or in wxPython?

Anyway, i used the following workaround :
Add from line 40 on the wxpython-demo listctrl_virtual.

···

#######
        self.Bind(wx.wx.EVT_MOUSEWHEEL, self.OnGtkMouseScroll)

    def OnGtkMouseScroll(self,event):
        lines = -(event.m_wheelRotation / event.m_wheelDelta) *
event.m_linesPerAction
        self.GtkScroll(lines)

    def GtkScroll(self,lines):
        #Scrollist is only supported on Windows :frowning:
        top = self.GetTopItem()
        if lines < 0: #up
            self.EnsureVisible(max(top +lines,0))
        else: #down
            bottom = top + self.GetCountPerPage()
            self.EnsureVisible(min(bottom+lines,self.GetItemCount()))

##############
Martijn.

Martijn Voncken wrote:

Hi,

On wxGtk there is no support for a mouse-scroll-wheel, or for Scrollist.
Are those bugs in wxWidgets or in wxPython?

Which version are you using? The scrollwheel works fine for me in the wx.ListCtrl in wxGTK2 2.5.4 and also current CVS.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

sent this mail a 2nd time, i did not see it in my out box.

debian sarge:
(last update: 2 weeks ago)
wxPython 2.5.3.2pre
(wxGTK, unicode, gtk2, wx-assertions-off)
Running on Python 2.3.5

desktop manager: KDE

I'll test it on 2.5.4 as soon as it is available in debian sarge.

Martijn.

···

On Sat, 26 Mar 2005 12:55:46 -0800, Robin Dunn <robin@alldunn.com> wrote:
Which version are you using? The scrollwheel works fine for me in the
wx.ListCtrl in wxGTK2 2.5.4 and also current CVS.