PDA

View Full Version : wxPython -- New items in ListCtrl won't become visible



OlleEriksson
June 19th, 2007, 02:58 PM
Currently i have my first (real) Python project going on, and i have a little problem with wxPython, that I use to get a GUI. The problem is that if I add a new item to a ListCtrl, it adds just fine to the item list, but it doesn't become visible. The items are visible if I add them automatically when the program starts, so the problem only shows up when I add them afterwards.

Anyone have a solution for this?

AdamG
June 19th, 2007, 08:58 PM
Can you post a test case? I've worked with wxPython a far amount, and I've never had trouble adding to a listCtrl... What version of wxWidget & wxPython are you using?

OlleEriksson
June 20th, 2007, 06:56 AM
Isn't it typical? When i built the test case, it worked! I don't know why it worked this time, since the code is practically identical to the real case.

I post the code anyway...

Edit: I forgot to say that I'm currently on a Windows machine (I'm at work), but I got the same result at home (the old code, where the new items didn't show up, haven't tried the new code at home yet).