I've been having issues with CustomTreeCtrl leaving behind ghosted controls in my application that supports Copying/Pasting nodes.
If I copy a bunch of nodes in the middle of my tree and paste the copies...the controls on the tree nodes that got pushed down (such as a wxTextCtrl) sometimes seem to stay where they were (effectively covering the newly pasted nodes). It doesn't appear to be a purely visible ghost, because I can click in the text boxes and edit them.
that third image is poorly named - thats after a collapse/expand of the "feature" node, not after a Refresh in the code.
Has anyone else noticed this behavior with CustomTreeCtrl? Is it just something I'm doing wrong in the code? Or is it a bug? I've tried using RefreshSubTree and passing it the parent node of the level that I'm doing copying on - that did not help. I've also tried using Freeze/Thaw before/after I paste the items - that also did not help. Generally when I collapse/expand the tree - then the controls finally get put into the right place (although not always).
Looking at the Expand method I see a couple other things that might affect the layout of the child widgets. In addition to self.RefreshSubtree(item) it calls self.CalculatePositions() and self.HideWindows(). Have you tried those?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
calling HideWindows() on the tree seemed to do the trick. Sometimes it leaves 1 control behind for a second or two, but it is certainly much better than before.
Thanks,
Andrew
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Friday, December 29, 2006 5:55 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] CustomTreeCtrl control locations not
refreshing
Pangborn, Andrew (ext. 324) wrote:
I've been having issues with CustomTreeCtrl leaving behind ghosted
controls in my application that supports Copying/Pasting nodes.
If I copy a bunch of nodes in the middle of my tree and paste the
copies...the controls on the tree nodes that got pushed down (such as a
wxTextCtrl) sometimes seem to stay where they were (effectively covering
the newly pasted nodes). It doesn't appear to be a purely visible ghost,
because I can click in the text boxes and edit them.
that third image is poorly named - thats after a collapse/expand of the
"feature" node, not after a Refresh in the code.
Has anyone else noticed this behavior with CustomTreeCtrl? Is it just
something I'm doing wrong in the code? Or is it a bug? I've tried using
RefreshSubTree and passing it the parent node of the level that I'm
doing copying on - that did not help. I've also tried using Freeze/Thaw
before/after I paste the items - that also did not help. Generally when
I collapse/expand the tree - then the controls finally get put into the
right place (although not always).
Looking at the Expand method I see a couple other things that might
affect the layout of the child widgets. In addition to
self.RefreshSubtree(item) it calls self.CalculatePositions() and
self.HideWindows(). Have you tried those?
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org