07-07-2010 11:13 AM
I would like to have pull-down boxes always display their items in order. Most importantly, when I select boxes with date strings, I would like the most recent data at the top of the list. I have a series of pull-down boxes that are populated by strings, read from a 2D array of strings, for the selection of a particular data file. The boxes are handled by a producer/consumer setup that refines the search with each selection. After each selection, the order of the items in the boxes will flip. I believe that this is because after each time the array passes thru the prod/cons, what was the bottom is written to the top of the array and the what was the top is written to the bottom. For example, the first time the data is read in, the oldest string is at the top. If I make a selection, then move to select from the next box, the newest string is at the top. If I make a third selection from the next box, the oldest string is at the top again. So, with all that, does anyone have some insight on how to achieve a constant ordering scheme.
07-07-2010 11:32 AM
What do you mean by pull down boxes? Text Ring? Menu Ring? Enum? Post your code so we can look at it. The order should never change unless you code it to do so.
07-07-2010 11:56 AM
tbob,
I must thank you for saying the magic words "The order should never change unless you code it to do so". I have staring at my code for too long and missed the simple fact that I've already sorted in one place but not another. Also, I apologize for calling Combo boxes, pull-down boxes. I was at a loss for the proper name at the time. I realize that if I'm confused about the name of something, the people trying to help me will be, too.![]()
07-07-2010 01:21 PM
So have you fixed your problem by adding sorting code?