[wxPython-users] CustomTreeCtrl control locations not refreshing

Pangborn, Andrew (ext. 324) axp at qvii.com
Tue Jan 2 06:46:36 PST 2007


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 at alldunn.com]
Sent: Friday, December 29, 2006 5:55 PM
To: wxPython-users at 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.
> 
> Here are some pictures to give you a better idea of what I'm talking about:
> http://andrewpangborn.com/files/pictures/before_copy.JPG
> http://andrewpangborn.com/files/pictures/after_paste.JPG
> http://andrewpangborn.com/files/pictures/after_refresh.JPG
> 
> 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 at lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org





More information about the wxpython-users mailing list