Stano 143 Posted August 30, 2023 I have on form 10 VST as trees with two levels. I'm getting very strange behavior that I haven't encountered before. VST: have set basic properties - for sure they appear collapsed I expand a node (of course on level 0). I won't expand another node. I have two options: I put Sender.Invalidate in OnExpanded, or click on another VST and go back I select the node at level 1. If I want to select another one, I have to click 2x on the tree, the node There are considerably more of these problems. Trees are simply not updating, not redrawing or something else Plus my custom navigator, based on TAdvPanel, doesn't call the OnEnter event. With that state, the form can't be worked with at all. It's driving me crazy already. Is there a soothsayer who can direct me? Share this post Link to post
Stano 143 Posted August 30, 2023 Make-up. It probably plays a role. If I add or remove any unit in the dpr, it throws me a DataModule reference after the end of the dpr. Something is wrong with it and I can't seem to get rid of it. Share this post Link to post
Stano 143 Posted September 1, 2023 Attached are separate units Form and DataModule UPokusActionBar.pas dmBasic.pas Auxiliary files DeclarationTypes.pas FDFunction.pas SQLTexts.pas VSTreeFunctions.pas Basic files that form the skeleton in my programs CustomObject.pas CustomVst.pas VstAsTree.pas "Superstructure" files. There is a problem somewhere CoachToTeam.pas RelationTree.pas Everything can be downloaded here. Working example.. www.uschovna.cz/zasilka/MJ3XRK2MDRGJDWWJ-53U Shipment code MJ3XRK2MDRGJDWWJ-53U Pokusy Units.zip Share this post Link to post
mytbo 5 Posted September 1, 2023 With this data structure for the VST, it would be easier to use a class as a record for the tree data. The VST should better not hold the data, but only display it. This article shows how easy it is to map a data structure in VST. Here is the translation into English with Google Translator. The result is not perfect (rather not so good), also some formatting is destroyed, but it is readable. With best regards Thomas Share this post Link to post
Stano 143 Posted September 2, 2023 (edited) Thank you for your contribution. I will take a look at the article. For me there is no point in changing it. The problem is elsewhere. I still add that it will never call OnChange !!! When using the RealitonTree class all VSTs as trees are broken. For me it is very complicated. And unnecessary. I have to keep the data somewhere. So let them be in VST. Edited September 2, 2023 by Stano Share this post Link to post
Stano 143 Posted September 2, 2023 Repaired units. Cleaned uses. Pokusy.zip Share this post Link to post
Stano 143 Posted September 3, 2023 Hooray, I found it. I lost FVst.EndUpdate in CustomVst.FinallyFill; Share this post Link to post