Event for wxListCtrl scrolling Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Event for wxListCtrl scrolling

Post by extreme001 »

Hi!

I'm searching for a ScrollEvent on wxListCtrl. Is there anyway to find out if the scrollbars of wxListCtrl was used? Scroll-UP, Scroll-DOWN, LEFT and RIGHT scroll? Please help and thank you very very much!
:D
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

Would Event table macros from wxScrollBar be of any help?
extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Post by extreme001 »

No...i tried it...doesn't work!
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

Ok, then see if these are the ones:

Code: Select all

wxScrollWinEvent

EVT_SCROLLWIN(func)                Process all scroll events.
EVT_SCROLLWIN_TOP(func)            Process wxEVT_SCROLLWIN_TOP scroll-to-top events.
EVT_SCROLLWIN_BOTTOM(func)         Process wxEVT_SCROLLWIN_TOP scroll-to-bottom events.
EVT_SCROLLWIN_LINEUP(func)         Process wxEVT_SCROLLWIN_LINEUP line up events.
EVT_SCROLLWIN_LINEDOWN(func)       Process wxEVT_SCROLLWIN_LINEDOWN line down events.
EVT_SCROLLWIN_PAGEUP(func)         Process wxEVT_SCROLLWIN_PAGEUP page up events.
EVT_SCROLLWIN_PAGEDOWN(func)       Process wxEVT_SCROLLWIN_PAGEDOWN page down events.
EVT_SCROLLWIN_THUMBTRACK(func)     Process wxEVT_SCROLLWIN_THUMBTRACK thumbtrack events (frequent events sent as the user drags the thumbtrack).
EVT_SCROLLWIN_THUMBRELEASE(func)   Process wxEVT_SCROLLWIN_THUMBRELEASE thumb release events.
extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Post by extreme001 »

No succes!

Well....it seems to be impossible. Thank you very much for your help.
zhukovim
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Jan 18, 2011 7:04 pm

Re: Event for wxListCtrl scrolling

Post by zhukovim »

Is something changed since 2009? Who knows how to catch scrolling event in wxListCtrl?
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Event for wxListCtrl scrolling

Post by catalin »

Looks like nothing has changed in wxW 3.0.0. Such events are not emitted, but I guess a patch adding them (wxEVT_SCROLL_* or wxEVT_SCROLLWIN_* type of wxScrollEvent or wxScrollWinEvent respectively ?) would be welcome.

The candidate locations seem wxListMainWindow::ScrollList() in src/generic/listctrl.cpp
and wxListCtrl::ScrollList() in src/msw/listctrl.cpp .
Of course it's better to discuss this first on the wx-users or wx-dev mailing lists.
extreme001
I live to help wx-kind
I live to help wx-kind
Posts: 192
Joined: Fri Dec 22, 2006 9:17 am
Location: Germany
Contact:

Re: Event for wxListCtrl scrolling

Post by extreme001 »

Hi!

I've seen this topic coming up again. Sadly but true: I think it's a bit to complicated to develop applications with wx. The community is nice but not the same as Qt as an example. The "movement" and "growness" in wx is not as i expected...

Thank you anyway for your help!
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Event for wxListCtrl scrolling

Post by doublemax »

Qt has at least 100 times (not exaggerated) more man power than wx.

And regarding the initial question: wxListCtrl is a native control under Windows and does not derive from wxScrolledWindow. So it will never emit those events. If you really need this, you could try using wxGenericListCtrl instead.
Use the source, Luke!
Post Reply