Tree View selectable expansion level

Every tree view I’ve ever worked with has the ability to set the level at which the tree view will be expanded when first initialized. All I see with this tree view is expandAll() and collapseAll(). This gives you one extreme or the other. Our customers will not like having to click about 20 expansion boxes to get the tree view to their desired default viewing level of expansion.

The tree view I am currently working on has 4 levels, with over a thousand nodes. The customer wants to start out with the tree view expanded to the third level so that all they have to do is expand the third level node they are interested in to get to the corresponding 4th level nodes. As it is now, they have to expand all the 1st and 2nd level nodes to get to their desired starting point. This takes about 20 clicks to accomplish. It may not sound like a lot, but if you do it several times a day, it’s very time consuming.

I would like to request the ability to select a level of expansion for the tree view on the initialization of it. Thanks.

I havent tested it but what about if you set the "Selected Path " property to the path that you want when the window first opens up?

That doesn’t have any effect on the tree expansion as far as I can tell. I tried setting it to several different nodes and the tree expansion was not affected. Thanks for the suggestiion.

I do this with my Tree View in several projects and it seems to work just fine… I want a blank chart to open whenever a client is opened

I use a Set Property on the window internalFrameActivated event…

Property: {Root Container.Tree View Navigation.selectedPath}
Value: None/None

I may not have made my point clear here. I am not concerned with what the selected path is on the tree. It’s the level to which it expands that I would like to be able to select. Below is part of a tree that is shown fully collapsed. Not much to see here.

And here is part of the same tree fully expanded.

And below is the way in which I would like it to look when it is first initialized. It is expanded to the 4th level, but not the 5th, which is full expansion. This is a small tree by our standards. Imagine this with 1300 nodes, fully expanded. The customer wants to see all routes, expand the route node for which he is interested, then collapse it and expand another. With the tree at this level of expansion, it only takes one click to expand a route, then another to collapse it again.

There may be a way to do it, but I am going to throw out a little different suggestion.

Instead of having your devices on the tree, how about displaying them in a table to the right of the chart? we do something similar to what you are doing, of course I am assuming that these are wellsites that you are dealing with based on what I see in your screenshot.

anyway, we list our groups on the tree, then when you click on the group in the tree it populates a table that has all of the devices in the group and also a ton of other live info like flowrate, pressure, etc. That way the user can see a snapshot of what is going on with everything in the group when they click on it. if they want to look at a specific device you can then double click on the device in the table which will bring you to device specific screens where you can trend/change setpoints etc. If you want to really get fancy, you can even set it up so that users logging in can only see the parts of the tree that are assigned to them. that way they dont have to navigate thru a bunch of stuff that is useless to them. One of our projects has 2000 meters and probably around 200 different groups.

Thanks for the suggestions. I see your point in using a table for the last level of nodes, i.e. the wells. We were planning on double-clicking on that well node in the tree itself to bring up a details window that would show all the latest values for the well, as you described. But your method would allow me to remove the last level of nodes from the tree, then set the tree to initialize fully expanded to show down to the routes. I can use this method in the interim, but I still would like to have the ability to select the expansion level. :slight_smile: Thanks again for your input. I appreciate it.