471,317 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

ListView Problem

Ion
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 :(.
Jan 11 '06 #1
0 991

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Steph. | last post: by
reply views Thread by Sérgio Almeida | last post: by
3 posts views Thread by MikeY | last post: by
4 posts views Thread by firefox | last post: by
3 posts views Thread by Martin Panggabean | last post: by
12 posts views Thread by garyusenet | last post: by
4 posts views Thread by Brian Gaze | last post: by
2 posts views Thread by =?Utf-8?B?UGhpbGlw?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.