Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox string indices floating around

Status
Not open for further replies.

PlasmaZero

Programmer
Dec 6, 2002
13
0
0
US
I'm making a prog where the user selects something from a combo box and clicks a button to add it to two listboxes, one for the string itself and another corresponding one for the quantity. The user can select the string in listbox #1 and move a slider to adjust the quantity. However, when I try to add an item after adjusting one of the quantities, it gets moved down. For example,
String 3
*click*
String 1
String2 3
It looks to me like the index of the quantity string is going up one every time (as if when I add a new string it becomes the new 0), except that my code is simply:
listbox1.addstring(string)
listbox2.addstring(1).
Any ideas on why this would happen?
 
Erm, oops, forgot to uncheck Sort in the second box's props. Never mind then.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top