G
Guest
Hi,
I am trying to clear a combo box at runtime. I am using the remove method,
and then I use the refresh method in order for the combo box to display
properly. But it does not work. I seemed to be missing something. Can anyone
help? I have been away from this for a while.
In C#:
iCnt = cbo.Items.Count;
while (cbo.Items.Count >0)
{
cbo.Items.Remove(iCnt); \\it removes it, but it does not reset the count
property
cbo.Refresh();
iCnt--;
}
I am trying to clear a combo box at runtime. I am using the remove method,
and then I use the refresh method in order for the combo box to display
properly. But it does not work. I seemed to be missing something. Can anyone
help? I have been away from this for a while.
In C#:
iCnt = cbo.Items.Count;
while (cbo.Items.Count >0)
{
cbo.Items.Remove(iCnt); \\it removes it, but it does not reset the count
property
cbo.Refresh();
iCnt--;
}