Sorting a PopUpMenu

I am using a Xojo PopUpMenu on OS X which i fill with 142 Text (String) Values + RowTags in the Open Event.
Because i use constants for Multilanguage Support for the Strings, i would like to sort the Rows alphabetically.

I thought about loading all this into a ListBox, sorting it and then loading it into the PopUpMenu. But i hope there is a “smarter”, faster way to do this.

Has anyone already a solution for this and would you share it with us/me please? :slight_smile:

PS: I have searched the Forum and Web without any luck so far…

Load the values in arrays, use array.SortWith() and populate the menu from the (sorted) arrays.

Ah! Foundit! Thank you :slight_smile:

An example: http://documentation.xojo.com/index.php/Sortwith

I had to do something similar but storing folder item names and data, I found this page, I wrote the code and I decided to write a small page about it: https://www.maxprog.com/site/blog/post.php?id=787 (hope it helps others). I am in the process of creating a small blog with Xojo problems and solutions as I am working on my projects. This is the first page, the index link will at some point redirect to the other Xojo posts :slight_smile:

Stan Busk