Copy link to clipboard
Copied
Hi,
When I create a drop-down menu in a dialog box (list of the fields for example), the items are classified in the unicode character order.
Is it possible to sort them in a customized order or indicate the position of the items?
thanks in advance.
@+
Copy link to clipboard
Copied
No. If you want them sorted in another way you can do so by adding "1.", "2.", etc. before them.
Copy link to clipboard
Copied
Well actually, there is an undocument function for inserting items into a list. Items are added to the end of the list.
dialog.insertEntryInList({"item_id":{lst}});
where "lst" is the normal object used to initialize a list. It can be one item.
Copy link to clipboard
Copied
“...can do so by adding "1.", "2.", etc. before them”
that's what I did...
dialog.insertEntryInList({"item_id":{lst}});
I will try!
thanks
Copy link to clipboard
Copied
This function only controls the order when it is used to add entries one at a time. Groups of entries are sorted within thier own group.
Copy link to clipboard
Copied
Hi Thom,
Sorry for this late answer.
dialog.insertEntryInList({ "LST1" : { "abc" : -1 } }); works very well.
I also discovered we can add a separator with:
dialog.insertSeparatorEntryInList("LST1");
Are there any other useful tips like that?
Is it possible for example to write an item in color?
Thanks
@+
Copy link to clipboard
Copied
There are some fancier list operations, but color isn't one of them. The problem with many of the undocumented functions is that they are incomplete, which is probably why they are undocumented. If you look around for post on the topic you'll find several things that Adobe employees have posted, particularly in the blogs.