Hi,
I have a ListView that is filled with selected paths from
OpenFileDialog. Some times ListView is not redraw after OpenFileDialog
close. I tried to fill paths to ListBox. I got the same problem.
Invalidate() and Refresh() did not help.
I tried to fill paths to TextBox, just for test only. Everything work
fine, but I have to use ListView or ListBox.
This is the code that I use:
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All files (*.*)|*.*";
ofd.CheckPathExists = ofd.CheckFileExists = true;
ofd.Multiselect = true;
if(ofd.ShowDialog() == DialogResult.OK)
foreach(string str in ofd.FileNames)
if(!this.listBoxTest.Items.Contains(str))
this.listBoxTest.Items.Add(str);
Thank you,
Ion.
p.s. http://www.codecomments.com/message700593.html - the same problem,
but no answer :(.