|
-
March 15th, 2012, 05:51 PM
#1
How to add items to a specific index in a listbox
i want to fill the listbox so that when ive added everything the data is in order.
int index = 0;
if (priority < PriorityList.SelectedItem)
{
while (priority < PriorityList.SelectedItem)
{
index++;
}
PriorityList.Items.Add(priority);
}
else
PriorityList.Items.Add(priority);
the problem im having is keeping track of the index. if the item is smaller than the selected item the selected item moves onto the next index until it gets to a point
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|