We've recently run into a problem with combo boxes and mixed case data that I am looking for some clarification on.
Regardless of how we have the "Unsorted" property set (TRUE or FALSE), modifying the combo box for a given value always goes to the first matching value independent of the items case.
We have a scenario in a live system where the following 2 items are in a combo box. "aa" and "AA". When modifying the combo box with either "aa" or "AA", the end result is the item that is shown as being selected, is whichever one is sorted in the combo box first.
I've written a small Acubench program for the following example and attached to this post.
Example: I have 2 combo boxes with the following values loaded in this exact order.
"A1 3", "B1 2", "C1 1", "a1 4", "b1 1", "c1 2".
The first has the property of Unsorted (false), the second Unsorted (true).
Here is the output based on the unsorted flag
| Unsorted (false) - (So in effect sorted) | Unsorted (true) - (So in effect NOT sorted) |
|
"A1 3" "a1 4" "b1 1" "B1 2" "C1 1" "c1 2" |
"A1 3" "B1 2" "C1 1" "a1 4" "b1 1" "c1 2" |
******
Unsorted (false) sorts the items A-Z as if there were no case. So ignoring case, "A1 3" is less than "a1 4" so comes first. However even though it was loaded later "b1 1" is less than "B1 2" so the lower case appears first.
If I modify the combo box with the value "a" or "A" it selects "A1 3". However "b" or "B" selects "b1 1".
******
Unsorted (true) sorts the list exactly in the order the records were added.
If i modify the combo box with the value "a" or "A" it still selects "A1 3". However "b" or "B" now selects "B1 2".
******
In my opinion the behavior of both cases is "incorrect", but even if I'm not understanding something and they are correct, the behavior at least seems to be at odds.
To me both should return/select the value that matches the case you used to modify, but even if they both don't I would think one of them would have.
#mixed
#combo-box
#combobox
#lower
#case
#order
#Sort
#Upper