Adding a field to a ListViewItem
-
Hello, I'm getting stucked at this point : I've created a new class called ListViewItemEn that inherits from ListViewItem, I need to add a String into this new class called FullPath, since this point is all ok, my problem is that I'm not able to override the constructor
public ListViewItemEn(String[] text, String path) { }
I should add all the string of text into subitems, but it starts adding in the 2° column Here's my codepublic ListViewItemEn(String[] text, String percorso) { this.FullPath = percorso; for (int i=0; i< text.Length;i++) { this.SubItems.Add(text[i]); } }
How can I solve that? thanks in advance Paolo -
Hello, I'm getting stucked at this point : I've created a new class called ListViewItemEn that inherits from ListViewItem, I need to add a String into this new class called FullPath, since this point is all ok, my problem is that I'm not able to override the constructor
public ListViewItemEn(String[] text, String path) { }
I should add all the string of text into subitems, but it starts adding in the 2° column Here's my codepublic ListViewItemEn(String[] text, String percorso) { this.FullPath = percorso; for (int i=0; i< text.Length;i++) { this.SubItems.Add(text[i]); } }
How can I solve that? thanks in advance PaoloThere already is a method that takes an array of items to initialize the LVI with. In any case, it's behaving correctly. You need to set the Text property of the base class, and the SubItems are columns 1..n Marc My website
Latest Articles: Object Comparer String Helpers -
There already is a method that takes an array of items to initialize the LVI with. In any case, it's behaving correctly. You need to set the Text property of the base class, and the SubItems are columns 1..n Marc My website
Latest Articles: Object Comparer String Helpersexcuse me, what u mean for base class? System.Windows.Forms??? thanks in advance Paolo