I've run into a problem where I want to display a list of items in a checkListBox and programmatically check them off one by one as each process I am monitoring gets completed.
I will try to water my code down to the bare essentials so everyone can easily grasp what is happening.
for (int i = 0; i < 10; i++)
{
SOME_FUNCTION();
progressBar.Value++;
checkListBoxItems.SetItemCheckState(i, CheckState.Checked);
}
This is essentially what my code is doing. The progress bar gets updated while the loop is running, but all of the check boxes do not get checked until the loop is finished and they are all checked at the same time.
This obviously defeats the purpose of displaying the check boxes and I was curious if there was something I was missing that allows you to refresh the checkListBox control, or something similar.
I apologize if this question seems vague, I seem to have that problem quite often here.
Thank you all for your time and help,
Kyle