Page 1 of 1

Alternative to sort_list

Posted: Tue Jun 13, 2017 8:58 pm
by HMJust
In a Windows application I have a treeview with items. The treeview is sorted on two levels, each on an alphanumeric field.
When the user has selected an item, I want to be able to select the next item (the one below or the one above). As in:

Code: Select all

Treeview and items:
A
B
C
C.1
C.2
C.3
D
D.1
D.2
E
if the user has selected C.2 I want to be able to move that selection to C.3 or C.1. From C.3 I might want to move the selection to D.1, and so on.

This is fairly easy if I know the order the items are displayed in the treeview. But I don't necessarily do that.

The treeview items seem to be sorted differently than the sort_list does. For instance I get this order in the treeview:

Code: Select all

Lok: P31- Ord: 4656
Lok: R10-F3- Ord: 4656
Lok: R12F3- Ord: 46
Lok: R1-F4- Ord: 465
(real data, it makes sense to us)

and this with sort_list:

Code: Select all

Lok: P31- Ord: 4656
Lok: R1-F4- Ord: 465
Lok: R10-F3- Ord: 4656
Lok: R12F3- Ord: 46
Is there a way to have sort_list (or an alternative) sort the same way as the treeview is displayed? Or is there a way to tell the treeview to go to the next (or previous) item?

Re: Alternative to sort_list

Posted: Tue Jun 13, 2017 9:24 pm
by kno_dk
Hi
Is it not nearly the same as http://vlforum.lansa.com.au/viewtopic.php?f=3&t=1380

/klaus

Re: Alternative to sort_list

Posted: Tue Jun 13, 2017 9:32 pm
by HMJust
No, I don't think so. That thread was AFAIK about controlling the displayed sorting. We are happy with the sorting as it is displayed but we are having trouble navigating that sort.