Topic "TreeView Node Expansion"

Author Message
InteXX
[View user's profile]

Joined: 2009-05-17
Posts: 21
Location: Fairbanks, Alaska
Hello

I'm not handy in C/C++, otherwise I'd consider volunteering to work on this myself. Maybe someone else can have a look? It's possible the TreeView code is too deeply embedded to make it easy to pull this off, but I'll propose it in any case.

I've done this in the past with my FoxPro code and it's worked pretty well.

When Explorer View's TreeView loads a node, the node's expand event can be modified slightly to include a load all of its grandchildren. This way a node's expansion control (the plus/minus symbol) will always immediately indicate whether or not it has children, even before we expand it.

Currently the model is that we have to select a node in order to determine whether it has children. This makes navigating the heirarchy a guessing game, which can become frustrating at times.

Some example psuedo code:

Code:
BeginEvent NodeExpand(ThisNode)
  ForEach ChildNode In ThisNode.Children
    If ChildNode.HasChildren = False
      ChildNode.LoadChildren()
    EndIf
  EndFor
EndEvent


Would such a change be possible to implement?

Thanks,
Jeff Bowman
www.intexx.com
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
I know. But loading child-nodes form remote server it expensive. If you have slow line, it can take minutes.
_________________
Martin Prikryl
InteXX
[View user's profile]

Joined: 2009-05-17
Posts: 21
Location: Fairbanks, Alaska
prikryl wrote:
I know. But loading child-nodes form remote server it expensive. If you have slow line, it can take minutes.


Ah, I smell a user option coming on Wink

    TreeView loading behavior:
    -Load grandchildren on node expand
    -Load children and expand node on selection
And/Or, even better yet:

    TreeView node expansion:
    -Synchronous loading
    -Asynchronous loading
This way the user can choose for himself, instead of us choosing for him Smile

Thanks,
Jeff Bowman
www.intexx.com
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Asynchronous loading is definitely the solution. Though it is too much work, providing the feature is not that demanded. Will see if more people asks for that.
_________________
Martin Prikryl
InteXX
[View user's profile]

Joined: 2009-05-17
Posts: 21
Location: Fairbanks, Alaska
prikryl wrote:
Asynchronous loading is definitely the solution ... Will see if more people asks for that.


It sure is lonely here at the top, isn't it? Smile
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License