How do I get more events from a wxListCtrl in a panel?
David C. Fox
davidcfox at post.harvard.edu
Tue Jul 22 23:13:28 CEST 2003
bmoore at integrian.com wrote:
> I am working on an application using wxPython that includes a panel
> with a wxListCtrl populated with data received from a LAN attached
> I want the wxListCtrl panel to be loaded with a small amount of data
> initially. When the user moves the vertical scrollbar or press PageUp
> or PageDown, I want to load the list view with new data from the
> database. I only want to load the wxListCtrl with a subset of the
> database data at a time so the list view is responsive and will allow
> for handling large databases.
> The problem I am having is how to get events from the scrollbars or
> the PageUp/PageDown keys, etc. I can get events from selecting items,
Use a virtual list control (style wxLC_VIRTUAL) which doesn't contain
any data, but invokes callbacks to retrieve only those records which are
currently visible. See the example in the demo.
P.S. for wxPython specific questions, you will probably find a bigger
audience on the wxPython-users list (see
More information about the Python-list