Implement a selector-arrow behavior

I want to implement a selector-arrow behavior that exists in the ColumnResorter node. The point is to change the order of the elements inside the ListBox node. I want to implement the up-down arrows with the ‘refresh’ button of the RefreshButtonWidget node. I need two RefreshButtonWidget nodes, one with the ‘up’ and one with the ‘down’ function. The value of the button counter of the node is either 0 or 1. When I press the button, the value of the counter changes to 1.
The process of moving elements up-down inside the ListBox:
1; sort the elements in the ListBox into an array (list?),
2; change the element numbers of the array/list according to the value of the ‘refresh’ button:

  • if ‘up’: 1, then the number of the selected element in the ListBox increases by one within the array,
  • if ‘down’: 1, then the number of the selected item in the ListBox decreases by one within the array,
    3; update the array according to the new item numbers,
    4; update the listbox view according to the array with the new item numbers.
    In the implementation - I think - I definitely have to use flow-variables. This would be the goal, but the implementation has not been successful so far.
    Can I ask for help either to rework the process or to implement this process?

If you include a workflow showing what you have so far, the odds are greater that someone will start fiddling with it and figure it out.

1 Like