PDA

View Full Version : Combobox Sorting



rlane187
June 12th, 2019, 20:44
I ham using the combobox from CoreRPG. To populate the static list, I use onInit():


function onInit()
super.onInit();
clear();
add("-2", -2);
add("-1", -1);
add("0", 0);
add("1", 1);
add("2", 2);
add("3", 3);
add("4", 4);
add("5", 5);
add("6", 6);
add("7", 7);
add("8", 8);
end


The idea is that the user selects the appropriate modifier. The combobox lists the items in the following order, "-1, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8." This looks like string sorting vs. numeric sorting. Is there anyway to turn off sorting? I looked at the template and there is a boolean check of a variable called "unsorted" prior to sorting, but I do not see any place to set it.

Any ideas on how to control the sorting of the combobox?

Moon Wizard
June 13th, 2019, 00:46
To get the combobox to not sort, you need to define an <unsorted /> tag in the control definition.

Regards,
JPG

rlane187
June 13th, 2019, 01:07
To get the combobox to not sort, you need to define an <unsorted /> tag in the control definition.

Regards,
JPG

That did it. You are the best!