How do I get more events from a wxListCtrl in a panel?

B

bmoore

Hello.

I am working on an application using wxPython that includes a panel
with a wxListCtrl populated with data received from a LAN attached
database.

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,
etc.

Thanks,
Brian
 
D

David C. Fox

Hello.

I am working on an application using wxPython that includes a panel
with a wxListCtrl populated with data received from a LAN attached
database.

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,
etc.

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.

David

P.S. for wxPython specific questions, you will probably find a bigger
audience on the wxPython-users list (see
http://www.wxpython.org/maillist.php)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top