Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-08

VirtualTreeView question, horizontal jump

13 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jürgen Hestermann

I am currently fighting with VirtualTreeView which I got running after having a hard time with poor/non-existing documentation (which is a real pain for such sophisticated libraries).

But now I am stuck again:
I am able to create a tree (directory structure of a file system) but when moving down with the keyboard the tree jumps horizontally out of view to the left each second move. So at first I see my tree structure, on the next cursor down it is moved horizontally out of sight and the next cursor down brings it back again (horizontally moved to the left) and so on. I can scroll it back to the left with Ctrl+Left but it's a pain having to do this after each second cursor-down key.

I already inspected all properties but either they don't change anything (as "toExtendedFocus") or they seem not to be related to this behaviour.

Has anybody an idea what can cause this and how it can be changed?

Reply by email

Sven Barth
to Jürgen Hestermann
J?rgen Hestermann wrote
I am currently fighting with VirtualTreeView which I got running after having a hard time with poor/non-existing documentation (which is a real pain for such sophisticated libraries).

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)

I can't help you with your problem at hand though... Sorry.

Regards,
Sven

Reply by email

Jürgen Hestermann
to Sven Barth
Sven Barth wrote
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).

Another one:
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...

Reply by email

Jürgen Hestermann
to Jürgen Hestermann
J?rgen Hestermann wrote
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?

I now found that "toDisableAutoscrollOnFocus" (under "AutoOptions") is changing between these both behaviours:

If I set it to TRUE I can navigate as usual within the tree (without horizontal shifting) *but* when reaching the bottom border of the window the cursor disappears below it without shifting up the tree display. So I don't see my cursor anymore (which is totally useless). If I set it to FALSE the tree display is shifted up when reaching the bottom of the display *but* now it jumps to the right border every second down move (so that I don't see the tree anymore, only when shifting it back with Ctrl+Enter).

I don't know how to achive both: Shifting up the tree when reaching the bottom end *and* staying at the left border all the time.

Reply by email

luiz americo pereira camara
to Jürgen Hestermann

2013/8/21 J?rgen Hestermann

Show quoted text 20 lines
Am 2013-08-21 11:16, schrieb J?rgen Hestermann: 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? > > I now found that "toDisableAutoscrollOnFocus" (under "AutoOptions") is changing between these both behaviours: If I set it to TRUE I can navigate as usual within the tree (without horizontal shifting) *but* when reaching the bottom border of the window the cursor disappears below it without shifting up the tree display. So I don't see my cursor anymore (which is totally useless). If I set it to FALSE the tree display is shifted up when reaching the bottom of the display *but* now it jumps to the right border every second down move (so that I don't see the tree anymore, only when shifting it back with Ctrl+Enter).

Try to set toCenterScrollIntoView and toDisableAutoscrollOnFocus

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130821/5f58ce5e/attachment.html>

Reply by email

Jürgen Hestermann
to luiz americo pereira camara
luiz americo pereira camara wrote 13 lines
2013/8/21 J?rgen Hestermann < <mailto:>> I now found that "toDisableAutoscrollOnFocus" (under "AutoOptions") is changing between these both behaviours: If I set it to TRUE I can navigate as usual within the tree (without horizontal shifting) *but* when reaching the bottom border of the window the cursor disappears below it without shifting up the tree display. So I don't see my cursor anymore (which is totally useless). If I set it to FALSE the tree display is shifted up when reaching the bottom of the display *but* now it jumps to the right border every second down move (so that I don't see the tree anymore, only when shifting it back with Ctrl+Enter). Try to set toCenterScrollIntoView and toDisableAutoscrollOnFocus

With
toCenterScrollIntoView = True
toDisableAutoscrollOnFocus = False
the only change is, that the horizontal scroll is now centering (instead of moving to the right margin). This does not solve the problem because the tree is still out of sight.

With
toCenterScrollIntoView = True
toDisableAutoscrollOnFocus = True
I get the same as before (cursor moves below the bottom without shifting up the tree to make it visible).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130822/e58d8215/attachment.html>

Reply by email

luiz americo pereira camara
to Jürgen Hestermann

2013/8/22 J?rgen Hestermann

Show quoted text 37 lines
Am 2013-08-21 18:40, schrieb luiz americo pereira camara: 2013/8/21 J?rgen Hestermann > > I now found that "toDisableAutoscrollOnFocus" (under "AutoOptions") is > changing between these both behaviours: > > If I set it to TRUE I can navigate as usual within the tree (without > horizontal shifting) *but* when reaching the bottom border of the window > the cursor disappears below it without shifting up the tree display. So I > don't see my cursor anymore (which is totally useless). > If I set it to FALSE the tree display is shifted up when reaching the > bottom of the display *but* now it jumps to the right border every second > down move (so that I don't see the tree anymore, only when shifting it back > with Ctrl+Enter). > Try to set toCenterScrollIntoView and toDisableAutoscrollOnFocus With toCenterScrollIntoView = True toDisableAutoscrollOnFocus = False the only change is, that the horizontal scroll is now centering (instead of moving to the right margin). This does not solve the problem because the tree is still out of sight. With toCenterScrollIntoView = True toDisableAutoscrollOnFocus = True I get the same as before (cursor moves below the bottom without shifting up the tree to make it visible).

Please create an example and add a bug report

Make sure you are using
http://sourceforge.net/p/lazarus-ccr/svn/2775/tree/components/virtualtreeview-new/branches/4.8/

Luiz

Show quoted text 9 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130822/c4265ea3/attachment.html>

Reply by email

luiz americo pereira camara
to Jürgen Hestermann

I can reproduce the bug.

I will investigate further to see if occurs also in Delphi

Luiz

2013/8/23 J?rgen Hestermann

Show quoted text 19 lines
Am 2013-08-22 18:51, schrieb luiz americo pereira camara: > Please create an example and add a bug report > > > http://mantis.freepascal.org/**view.php?id=24905<http://mantis.freepascal.org/view.php?id=24905> -- ______________________________**_________________ Lazarus mailing list .**freepascal.org http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130823/d1c9f83c/attachment.html>

Reply by email

luiz americo pereira camara
to luiz americo pereira camara

In the mean time try to set hoAutoResize in Header.Options and set Header.AutoSizeIndex to 1

You should get the desired behavior

Luiz

2013/8/23 luiz americo pereira camara

Show quoted text 30 lines
I can reproduce the bug. I will investigate further to see if occurs also in Delphi Luiz 2013/8/23 J?rgen Hestermann > Am 2013-08-22 18:51, schrieb luiz americo pereira camara: > > >> Please create an example and add a bug report >> >> >> > http://mantis.freepascal.org/**view.php?id=24905<http://mantis.freepascal.org/view.php?id=24905> > > > > > > -- > ______________________________**_________________ > Lazarus mailing list > .**freepascal.org > http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130823/0ca50f91/attachment-0001.html>

Reply by email

Jürgen Hestermann
to luiz americo pereira camara
luiz americo pereira camara wrote
In the mean time try to set hoAutoResize in Header.Options and set Header.AutoSizeIndex to 1 You should get the desired behavior Luiz

Yes, that solves the problem (though I don't know why ;-)). Thanks for investigating in this.

Reply by email

luiz americo pereira camara
to Jürgen Hestermann

2013/8/25 J?rgen Hestermann

Show quoted text 12 lines
Am 2013-08-24 04:58, schrieb luiz americo pereira camara: In the mean time try to set hoAutoResize in Header.Options and set > Header.AutoSizeIndex to 1 > You should get the desired behavior > Luiz > > Yes, that solves the problem (though I don't know why ;-)). Thanks for investigating in this.

Basically, these options tell the component to automatically resize the Column 1 to fill the remaining header space (control width - width all other columns)

Luiz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130826/458ce9fb/attachment.html>

Reply by email

Jürgen Hestermann
to luiz americo pereira camara
luiz americo pereira camara wrote 16 lines
2013/8/25 J?rgen Hestermann < <mailto:>> Am 2013-08-24 04:58, schrieb luiz americo pereira camara: In the mean time try to set hoAutoResize in Header.Options and set Header.AutoSizeIndex to 1 You should get the desired behavior Luiz Yes, that solves the problem (though I don't know why ;-)). Thanks for investigating in this. Basically, these options tell the component to automatically resize the Column 1 to fill the remaining header space (control width - width all other columns)

Though it solves one problem it raises another:
I now cannot shift the whole tree horizontally with Ctrl+Right/Left anymore. When the tree has long node names and/or is deeply nested then some names cannot be seen anymore because they extend the window. It's no big deal now but ideally I would like to be able to view/show all possible path names.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130827/09e8872d/attachment.html>

Reply by email