wxPython and the wxTreeListCtrl
It appears that wxPython’s wxTreeListCtrl is not quite 100% correct. I am still new at the wxPython and wxWindows deal but apparently the wxTreeListCtrl does not fully implement either the wxListCtrl or the wxTreeCtrl. The first problem is that there is no way to edit a field inline (natively) other than the first column. That’s a problem because I only want the user to edit the second column. The other problem is that even if I was going to allow a double-click or right-click of a modal edit window, the wxTreeListCtrl seems to be trapping all of those events and not allowing them to flow through to the handlers that I activated. Not good. Therefore, I have retreated to a regular standard wxTreeCtrl and I will have an edit field at the bottom of the screen to change the value. I have already managed to get the system to store the actual DOMNode context with each element in the tree in the “data” property of each node. Because the context really just operates on a referenced version of the DOM as a whole, changing the data element of a node ultimately is changing the full DOM right then. Very simple. So, all I have left is to regenerate the DOM as XML (a single method call) and then I can write the string out to a file. Obviously, I still have some UI issues to deal with but my purpose for doing the configuration this way was primarily for the additional exposure to XML rather than languishing in a sea of UI issues which is pretty much what I have been doing lately. I really want to wrap up this project fairly quickly because I would like to start on my blogging application rather quickly. Plus, I have got to get back to my Nevada project.
1 comment1 Comment so far
Leave a reply
I am currently battling the same situation with the wxTreeListCtrl, but I noticed that your post on this subject is dated February 16,2004 and it is now 2006. Do you know if there been any updates to this control since then?
I am currently using wxPython version 2.4.2.4u for Python 2.2 on the win32 platform.