From: Jeff H. <je...@ac...> - 2009-07-23 18:09:30
|
On 23/07/2009 6:10 AM, Koen Danckaert wrote: >> Issue: >> - there is a vertical line from the top of the widget to the first node >> Addiditional explanation by Jeff: >> >> The reason I made that change was to be visually compatible with Windows >> (older style, as new style is no lines) when you actually have sub-nodes >> (the [+] and [-] indicators). The line to the top is then inconsistent >> with the way others draw. >> You could try and make that check contingent on whether subnodes exist, >> but I think that may seem odd. > > My opinion is: > > - When the first node has subnodes, it does not really matter. Both > styles look good visually. It may be inconsistent with some older > Windows style, but as Jeff points out, the new Windows style is to > draw no lines at all. So why would we still try to match the older > style? I actually disagree on this point. With subnodes it actually does look odd to anchor right to the top. > - When the first node has no subnodes, it looks strange to have no line. > - When there are only 1 or 2 nodes in the tree, it looks even more strange: > > pack [Tree .t -padx 2] > .t insert end root node1 -text "Node 1" > .t insert end root node2 -text "Node 2" ;# try with and without this line > > Of course, you could say that you never want a tree with only 1 node, > but in one of our applications we let the user interactively create a > tree, and in that case a tree with 1 node may be a necessary > intermediate state. > > Making the line dependent on whether subnodes exist would also be > strange: then the line will suddenly (dis)appear when subnodes are > created/deleted in such an interactive application. At first I was ambivalent, but I dug up an app where BWidget was still used that I wrote (GUI Builder, at http://spectcl.sourceforge.net). In it you will find a few use cases that in review I prefer the current (no top anchor line) behavior. You can find pictures of the various tabs at: http://docs.activestate.com/komodo/3.5/komodo-doc-guibuilder.html#guibuilder_top In there, you will see that the node to the top is actually drawn, and in the one in sources (with newer BWidget), it isn't. I actually prefer the newer lack of top anchor look, and it does have the single node case to start. I think this also applies to how the tree is used. When it has the classic single root node, it is better without the top anchor line displayed, but I could see it as ok with multiple root nodes. In the end, this can simply be made an option, like -showrootanchor or something. Jeff |