Ive got bit of a question as im trying to understand something. I dont need a code as i already found a walkaround for my problem, so im just trying to uderstand why this does not work.
Im gonna try to explain it in simplest way I can.
I have 2 forms:
- Form 1 is my main app menu form.
- Form 2 is my logger window that holds a big ListView control
Now Form 2 is only created when user presses specific tool strip button. But before user does that (actually that does not matter because it does not work even when form is created earlier) Im trying to feed that ListView in Form2 with some data. Ok so lest go with some code:
Form1 form = new Form1();
form.AddToListView(e.Name.ToString(), e.FullPath.ToString(), e.ChangeType.ToString());
internal void AddToListView(string fileName, string fileSourceLocation, string fileDestination)
ListViewItem item = new ListViewItem();
item.Text = fileName;
I debugged whole thing and it passes all data to "myListView.Items.Add(item);". Im just surprised because it passes all the values to the last stage but nothing appears in my ListView. Like I mentioned earlier i did a little bit of walkaround, I wrote class that handles data exhchanging for me. But Im trying to learn something in here so i would like to know why my first attempt didnt work.
Than you all for Your time in advance. Sorry if I overcomplicated things.