PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WD21] Navigating TreeView Control
[WD21] Navigating TreeView Control
Débuté par Christine Wagner, 20 juin 2017 09:36 - 2 réponses
Posté le 20 juin 2017 - 09:36
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
Posté le 20 juin 2017 - 13:49
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
Posté le 23 juin 2017 - 17:03
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