From: Damon C. <da...@tc...> - 2009-08-07 19:20:05
|
On Aug 7, 2009, at 12:59 PM, Jeff Hobbs wrote: > On 07/08/2009 9:06 AM, Damon Courtney wrote: >> What does tklib/widget currently support that is basically ripped >> from >> BWidget? What widgets from BWidget are actually worth saving? > > One thing lacking in tklib/widget is docs for most of the widgets, but > let me expound a bit on that here and answer the above. Note that > tklib/widget uses Ttk where ever possible. > > Existing widgets in tklib/widget: > > * widget::dialog > A dialog shell, with auto-timeout and other features. Similar to > BWidget Dialog but with more features > * widget::menuentry > Extends ttk::entry with a drop-down menu icon (e.g. for a search > box) > * widget::calendar & dateentry > calendar is a nice little month widget for selecting dates, and > dateentry extends ttk::entry to make a date-selection entry widget. > * widget::panelframe & superframe > Extended frame styles that wrap up and extend the ones in BWidget. > * widget::ruler & screenruler > Cute little ruler, as widget or special purpose toplevel > * widget::scrolledwindow & scrolledtext > Improvement on BWidget scrolledwindow, and scrolledtext which is > more > of an example widget that extends it > * widget::statusbar & toolbar > Based on BWidget statusbar to start, these became a bit different. > They could and should be rationalized to the same API, but I let > statusbar and toolbar diverge a bit as I was playing with APIs that > "felt right" in actual use. From what I have seen, most of the widgets in tklib/widget that replace a BWidget counterpart are far superior to the original. Also, because they do use TTK wherever possible, they tend to have a more native feel. > Note that I don't use any DnD stuff, and BWidget's dynamic help is > inferior (IMO) to tklib/tooltip, so many widgets are pointless when > you > take those "features" away. 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. > Button Deprecated by core I always wanted a button that was a little more complete. Specifically, rather than a separate menubutton widget, why not a - menu option on the button? Then you could have a -command option that says, "if the user clicks the button, do this" with a menu arrow on the right that could be clicked to drop down the menu (a la back buttons on most browsers). > LabelEntry bad UI > ComboBox Deprecated by core > SpinBox Deprecated by core > Tree Deprecated by core > ListBox prefer treectrl > MessageDlg tk_messageBox anyone? > ProgressDlg Use widget::toolbar with a ttk::progressbar > PasswdDlg meh > SelectFont not bad, but I always had to modify some bits > SelectColor should port this one 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. 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. 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. D |