[Lazarus] VirtualTreeView question, horizontal jump
juergen.hestermann at gmx.de
Wed Aug 21 11:16:07 CEST 2013
Am 2013-08-20 19:34, schrieb Sven Barth:
> Did you find this page? http://wiki.freepascal.org/VirtualTreeview_Example_for_Lazarus
> Also here is a tutorial in German http://www.delphi-treff.de/?id=176 (THE original tutorial for virtual treeview)
> Also there is a help download on the original site of the treeview: http://www.lischke-online.de/index.php/controls/virtual-treeview (scroll down till downloads)
Yes, I found these pages. Thanks anyway. But as written, I managed to use VirtualTree as far as I can create and manage the tree as I want but the navigation within the tree and the appearing options are full of miracles. All the documentation leaves lots of questions unanswered which appear when working with the VirtualTree component. One example is my reported current problem. Why is it behaving like this? Why does a normal move down shift the whole tree horizontally to the right margin each second move (slider is at max right position) and back to the left again? There are no hints in any of the documentations of why this occurs. Only a few properties are related to scrolling at all and as far as I see, they are only managing automatic scrolling for drag-and-drop situations.
Once I had the situation that the horizontal scrolling did not occur but also no automatic *vertical* scrolling took place so that when I moved down the tree the cursor disappeared below the bottom of the tree (the tree was not shifted up to follow it). After changing *lots* of settings it suddenly changed in that way that the cursor is now vissible all the time but the horizontal jump each second move appeared. I have no idea what caused this change because none of the properties seem to be related to scrolling at all (except auto-scrolling for drag-and-drop).
It seems that the horizontal extension of the tree is not calculated automatically (I did not find any information about this). If I set the column width to a small value and I then add deaply nested nodes I suddenly can't see the node captions anymore because they are "too far to the right", the horizontal slider is at its maximum but still there is text clipped. When setting a large value (like 10000) this does not happen but other things happen like inadvertent horizontal shifting (suddenly columns move out of sight etc.). Is this as designed? Or am I doing something wrong?
And when nodes are selected they appear in the same color as the focused node so that I can't see where my cursor is (within the selected nodes). No matter what I set "FocusedSelectionColor" to the cursor has always the same color as the selected nodes (which is none of the colors that are shown in the "Color" property!). So where do I configure it?
Another thing I would like to set is a cursor over the full width across all columns. One demo seems to do this but I don't know which of the settings make this happen (there are tons of more or less documented properties and many are related to each other).
> I can't help you with your problem at hand though... Sorry.
Too bad. All the demos look promissing but even when looking into the code I am unable to understand *why* things work as they do.
It's a pitty that many good libraries exist which lack of documentation. I know these people have only solved their own needs and published it for free which is highly appreciated. But I have already wasted such a lot of time testing lots of components only to realize that they are a good idea but unusable for serious programming that I am asking myself whether it's worth all this. So many dead ends that I am anxious to test yet another one...
More information about the Lazarus