From: Kevin W. <kw...@co...> - 2009-08-07 22:49:45
|
On 8/7/09 3:19 PM, Damon Courtney wrote: > > > The DnD stuff should be more generic to all Tk Widgets and should use > a command (like tklib/tooltip) instead of embedding an option on every > single widget to handle drag-and-drop. A simple DnD package could be > written that would just drop into any app and allow drag-and-drop > between widgets in the app. I've done this with simplednd: http://www.codebykevin.com/opensource/xplat_oss.html ... look for "simplednd" on the page. I haven't done much with it in an application yet, but was planning to stress test it some more and submit it to tklib at some point. Anyone's welcome to try it out! > > > The only comment I would make here is that I think the ListBox and > Tree widget are extremely useful, and the biggest thing that makes > them so useful is their API. Treectrl is immensely powerful but a > real bitch to use if you just want to slap together a quick listbox > with some icons. On the other side of that coin, ttk::treeview is > woefully inadequate for most jobs. The listbox and tree are the portions of BWidget I use heavily in my own apps. Their API is relatively straightforward, and they are very configurable. I have no problem turning an ugly Windows-98-style BWidget Tree into a reasonable implementation of a modern Mac source list with appropriate icons, colors, and so on. > > I would rather see a listbox and tree widget both built upon treectrl > that simply wrap treectrl into the same APi that BWidget already > uses. The BWidget API for trees and listboxes is consistent and easy > to grasp with just a quick look of the docs. The same cannot be said > of treectrl. +1, which is why I don't use treectrl. > > This would, of course, create a dependency on treectrl for any > toolkit. I don't know how anyone else feels about that, but I > personally think treectrl should be a part of the core anyway. I'm > willing to require it as a dependency because I think you're silly to > try and make any modern UI without it these days. I just want it to > be wrapped for when I just want to slap a little listbox in there. > > The chief problem with this is that treectrl, at least on the Mac, delves heavily into the deprecated Carbon API, and doesn't work with the new Cocoa version of Tk that will be the standard in 8.6. I'd rather leave the tree and listbox widgets as is for this reason. Like tablelist, they work best as script-level widgets that aren't so dependent on the underlying binary implementation. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com |