missing some listctrl row information

Hi,

Bertrand Son Kintanar wrote:

Hi guys i need some help.. this is really driving me crazy.

according to this the image here: http://ftp.b3rx.com/Screenshot-Terminal.png the first 4 rows represent a row in the listCtrl but when i display the rows of the listctrl in my wx application i get this http://ftp.b3rx.com/Screenshot-wxLoads-0.0.1.png instead you can clearly see that the the first element in status_id is blank. anyone can help? i have attached the complete source code in this message.

The problem seems to be with "data.index(item)+1" which does not return you the number you want to get, I replaced it with a column counter variable.

I had inserted some print statements (see attached code) which showed me:

wxLoads.py (9.14 KB)

ยทยทยท

=======
0
1

0
0 this should be one
1

0
2
0

The attached works for me on Python 2.5, wxPython 2.8.4.2 on Win Vista.

I also made some other changes to do with sizing as I didn't like the hard coded size of the window :slight_smile: , obviously nothing to do with your problem so just throw them away if you don't like them.

- removed all the hard coded sizing you had
- changed the version select for wx to ensureMinimal as I find select a bit restrictive
- changed the import to use sqlite3 which is included with Python 2.5 - from sqlite3 import dbapi2 as sqlite
- you used sys.maxint for "InsertStringItem", I was surprised that this worked as it should be the index to the list item.
- removed the static text which is added to each page but is not shown, maybe it should be shown above the listctrl?
- added a sizer to the panel of each listbook item, to ensure that the listctrl's would size when the window is resized
- added the Inspection mixin to help debug (activate with ctrl-alt-i)

Werner