[The following is with wxPython 2.3.3.1u under Windows]
I want to use a setup similar to the SplitTree demo example. However, the
tree's root will have many many children and I want to be as sensible as
possible with the amount of work that gets done on a redraw.
With this in mind - I wanted to use a call to tree.IsVisible(itemId) in the
DrawItem method of TestValueWindow to tell me whether I need to spend time
drawing this value or not. However, calling IsVisible seems to return true
for every node in the tree (or at least every node that is the child of an
expanded node). You can see this for yourself by just adding a little output
to the logfile in the DrawItem method in SplitTree.py. You should see that
as soon as the panel is drawn, Item 29 IsVisible even though it's off down
at the bottom of the tree and you have to scroll to see it.
A) Am I mis-interpreting what IsVisible() is for?
B) If not - anyone suggest a way to get the behaviour I want (only do work
for tree items that are visible)
[The following is with wxPython 2.3.3.1u under Windows]
I want to use a setup similar to the SplitTree demo example. However, the
tree's root will have many many children and I want to be as sensible as
possible with the amount of work that gets done on a redraw.
With this in mind - I wanted to use a call to tree.IsVisible(itemId) in the
DrawItem method of TestValueWindow to tell me whether I need to spend time
drawing this value or not. However, calling IsVisible seems to return true
for every node in the tree (or at least every node that is the child of an
expanded node). You can see this for yourself by just adding a little output
to the logfile in the DrawItem method in SplitTree.py. You should see that
as soon as the panel is drawn, Item 29 IsVisible even though it's off down
at the bottom of the tree and you have to scroll to see it.
A) Am I mis-interpreting what IsVisible() is for?
B) If not - anyone suggest a way to get the behaviour I want (only do work
for tree items that are visible)
Does IsVisible with a regular tree control also do this? Either way, please enter a bug report about it.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!