From: Schollnick, B. <Ben...@xe...> - 2005-07-19 16:57:13
|
| Even if you do it in a loop after the data is loaded (equivalent to my second timed-test) it will still be faster than going through =20 | the self.components.MultiColumnList.items[x][0] loop.=20 =20 Why is there a speed penalty in looping through the Items loop?=20 =20 | It did get kind of lost - I assumed that you did the SetFocus to overcome it ....=20 =20 I tried it, but I couldn't find heads or tails on the SetFocus documentation from wxPython.... And it appears to be for setting the focus on a group/item, not on a element in a list. | The wxPython doc for ListCtrl say you can use EnsureVisible - and I verified it by adding to my version of the sample | self.components.theList.EnsureVisible(itemidx)=20 =20 I searched, but must of missed that....=20 [Remember - PythonCard is just a layer over wxPython, you can generally look in the wxPython docs and call those functions listed there for the underlying control. You'll get faster turn-around on questions by looking up the docs yourself than waiting for me to happen to read email - 'cause all I do then is look at the docs, or at the source for the sample and/or the components/multicolumn.py :-) =20 =20 Except for the fact that I couldn't find EnsureVisible.... I'm not very happy with wxPython documentation... It's usable, but I prefer the layout of the Python docs... =20 =20 Either way, it's working now... Is the WIKI open to everyone? I'm considering trying my hands at adding some of these to the Pythoncard wiki... =20 - Benjamin =20 |