PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → [WD21] Navigating TreeView Control
[WD21] Navigating TreeView Control
Started by Christine Wagner, Jun., 20 2017 9:36 AM - 2 replies
Posted on June, 20 2017 - 9:36 AM
I'm using a TreeView to navigate between different topics. The TreeView has only three levels. Here is an example
Topics Open Topics Topic 1 Topic 2 Closed Topics Topic 3 Topic 4 The Topics may have the same name, so I'm using the duplicate functionality. On Click I'm showing the details of the topic on the right side of the window.
Everything works so far.

Now my problem:
We want to allow the user to navigate this tree using PageUp and PageDown (as is default in the rest of our application). I created a Button with PageDown as Shortcut. So far so good.

But I found no possibility to get the next node of the tree. The code should be something like
sCurPath is string = TreeSelect(TREE,true) //TODO get next node TreeSelectPlus(TREE,sNextPath) Any idea how to implement this "TODO get next node"?

Best regards

Christine Wagner
Posted on June, 20 2017 - 1:49 PM
Hi Christine,

you can create a SelectNextLine function by doing:
- a TreeListItem to get the tree content in an orderly manner,
- then loop in the result to find your current position
- get the next one
- do a TreeSelectPlus of it

Best regards
Posted on June, 23 2017 - 5:03 PM
Hi Fabrice,

thank you for your answer. I tried to get it to work, but time ran out. So now we decided to skip this navigation. Perhaps I will try it again at a later time.

Best regards

Christine Wagner