[Lazarus] Collapse/Expand "bug" in VirtualTreeView "fixed".

Jürgen Hestermann juergen.hestermann at gmx.de
Wed Aug 24 11:04:17 CEST 2016


Am 2016-08-23 um 18:36 schrieb Luiz Americo Pereira Camara:
 > 2016-08-23 12:11 GMT-03:00 Jürgen Hestermann <juergen.hestermann at gmx.de>:
 >     I have investigated a bit more into the "bug" in VirtualTreeView where clicking
 >     on the plus or minus left to a node to collapse or expand it only works when
 >     this (main) column is the most left column.
 > Do you know what is the behavior with Delphi?

No, unfortunately I am not using Delphi.
But if the same code is used with Delphi, why should it behave differently?


 > Can you open a issue with a sample project?

What do you mean?
Open a bug report?
I am not sure how to do that...

I have changed my VirtualTreeView.pas file now and the bug is gone.
So if anybody encounters the same problem (and IMO it must be
everybody who uses hierarchical nodes when the main column
is *not* the most left one) can use the mentioned workaround or
even modify his VirtualTreeView.pas file too.
Of course, it would be better, if this can be fixed in the
official sources too but I am not able to do that.

Another question is, why GetHitTestInfoAt searches for a non-empty
cell while VTV does not even know how such cells are defined.
I don't see any rational behind it.

And even if that makes sense it does not make sense to set
the default Result in ColumnIsEmpty to true.
IMO it has to be false.
If the programmer adds an event routine OnGetCellsEmpty
he can override this behaviour but the default should be false.
It took me years to find out that I can circumvent this bug
by adding an OnGetCellsEmpty event routine.



More information about the Lazarus mailing list