Vender Aeloth
Vender Aeloth

Reputation: 788

How to bind scrollbar bottom in wxPython ListCtrl

I'm a beginner in wxPython but I don't figure out how to bind one event.

I want to bind this "EVT_SCROLL_BOTTOM" from a ListCtrl...

From the documentation it seems there is no way to do it. ListCtrl doesn't inherit ScrollEvent.. But is there a way to workaroud?

How to bind an event from vertical ScrollBar in ListCtrl?

Should I create my own ListCtrl Class and add ScrollEvent inheritance?

Best regards,

Upvotes: 0

Views: 427

Answers (1)

harristyle
harristyle

Reputation: 178

As mentioned here: wx.ScrollEvent documentation, ScrollEvents are only emmited by stand-alone scrollbars and sliders.

However wx.ScrollWinEvents are emitted by Scrolling Windows such as a wx.ListCtrl.

So in order to get the desired result you should bind the wx.EVT_SCROLLWIN_BOTTOM to your List Ctrl like so:

ListCtrlVariable.Bind(wx.EVT_SCROLLWIN_BOTTOM, self.FooEventHandler)

Upvotes: 2

Related Questions