|
From: Tim B. <tre...@ho...> - 2006-11-28 04:18:25
|
>Eckhard Lehmann wrote: >> Tim Baker schrieb: >>> TreeCtrl was never meant to be a front-end widget, it was meant to be >>> a back-end that could be used to create front-end widgets. People have >>> been using the Canvas for years as a back-end for all sorts of >>> listboxes and tree widgets. More recently, Tablelist can be seen using >>> the Text widget as a back-end for a multi-column listbox. Neither the >... >> You mean that treeview should be implemented on top of treectrl, as well >> as any table like widget? > Yes, I mentioned the same before. I had reservations in that treectrl was > memory hungry, but Tim did address that in part with treectrl 2.2. Still, > it > may be more efficient to go with a lightweight solution like treeview. > Unfortunately I don't have the time to write the requisite snidget, but > from > reviewing the treeview docs, and knowing treectrl pretty well, treectrl > can do > 100% of what treeview requires. Thus a snidget is possible for someone > enterprising enough to try. I've even attached the right template to > start > from. ;) > Of course, you would probably design the treeview differently, if you knew > you > planned to build it on treectrl. That was part of the hesitation to > include > it in 8.5. > Jeff I actually did this. It isn't very robust in terms of error checking and doesn't use the tile fonts among other things. But api-wise it can be used in the tile demo.tcl and dirbrowser.tcl. Just edit the pathname at the bottom of the attached file to see it in action. Requires perhaps the latest versions of snit, tile and treectrl. -- Tim Baker |