View Single Post
Join Date: Mar 2008
Posts: 134
Reputation: cVz is an unknown quantity at this point 
Solved Threads: 7
cVz's Avatar
cVz cVz is offline Offline
Junior Poster

listview looping

 
0
  #1
Dec 4th, 2008
Sup ladies and gentlemen, please help me, i need to loop through the listbox, now here's what i have

  1.  
  2. foreach (ListViewItem ListItem in listView_Replacement.Items)
  3. {
  4. // finding the string in the current item rows
  5. string m_findText = listView_Replacement.Items[0].Text;
  6. string m_replaceText = listView_Replacement.Items[0].SubItems[1].Text;
  7.  
  8. string m_Messagetext = txtMessage.Text;
  9.  
  10. string m_MessageTextNew = txtMessage.Text.Replace("" + m_findText + "", "" + m_replaceText + "");
  11.  
  12. txtMessage.Text = m_MessageTextNew;
  13.  
  14. txtMessage.Refresh();
  15. }

Now obviously those values should not be [0] and [1] because i am looping , but can anyone give me any idea what to put in there ???

Thank you in advance

CvZ
Delphi & C# programmer deluxe...
Reply With Quote