Forum > LCL
[Solved] ShellTreeView Node Expand: why second expand is slower than first one?
d7_2_laz:
I'dthought about that as above
--- Quote ---A nice side-effect i could imagine is that a re-populated node will on-the-fly catch all modifications of the folder subtree needed from actions outside.
But imo that would be rather a question of how to deal with file change monitors.
--- End quote ---
Of course it makes sense to take care about external done file changes (implying fle change monitors). But then - consequently, amd not only at one single place (a re-opened node). What about siblings of the parent node, if a folder is deleted: why should they stay within the tree, whereas a re-expanded node should respect duch changes?
At this very basic level external file and folder changes necessarily are not yet in scope.
d7_2_laz:
Additionally.if you have a dirtree - filelist twin pair, you re-expand a node and expect to see folder changes hrtr, then one necesarily needs to re-read the listview's content completely too, otherwise dirtree and listview would go out of sync.
Expand = reread whole subtree. plus reread whole lfile - listview?
wp:
I think I'll add an ExpandCollapseMode property:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type TExpandCollapseMode = ( ecmDefault, // Current behaviour (--> default) ecmKeepExpanded, // Do not clear children of already-expanded, but collaped nodes (d7-2-laz's code) ecmCollapseAndClear // Clear children when node is collapsed );
d7_2_laz:
That'*s surely the best ... seems different preferences might exist :)
Else i had not other findings. Wow! And it's so fast! (i'm using ownerdata for the shell listview)
:)
Bart:
--- Quote from: wp on November 28, 2022, 02:33:23 pm ---I think I'll add an ExpandCollapseMode property:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---type TExpandCollapseMode = ( ecmDefault, // Current behaviour (--> default) ecmKeepExpanded, // Do not clear children of already-expanded, but collaped nodes (d7-2-laz's code) ecmCollapseAndClear // Clear children when node is collapsed );
--- End quote ---
ecmDefault is not very descriptive.
The fact that you make it default should already be reflected with the default modifier for the property.
Bart
Navigation
[0] Message Index
[#] Next page
[*] Previous page