Thursday, April 03, 2008

Visual Trick for Icon-less Node in TreeView [.Net, Windows Forms]

I have been spending my recent spare time to code more on Pocket Freemind. One of the addition/fix is on the handling of iconless node in TreeView (which is left blank by the framework).

As I wrote in my previous post that I used a square to fill it, although it does not look really representative. Later it was removed and leaving it blank, with the cost that the node looks like floating like below :


I later stumble upon this screenshots of "competing" product and think "Hey, I think I know how that is being done". It seems to use the standard TreeView and widget and there should be an image space between where the line and that text start, so there must be an image that mimic the line and make the line virtually longer and reach nearer to the text.

Some experiment with taking small screenshots of the line, copy and pasting with Paint.Net proved it right (or at least working the same way). It result in below :


Now, the line looks longer and better suit my taste.

Other people can have a different taste, of course. But in my case, and in the the context of mindmapping, I think it's better this ways since it can be quite confusing when I open a crowded mindmap and there's blank spaces everywhere making the nodes does not instantly apparent where it attached/connected to.

No comments: