thiago costa

thiago costa

  • NA
  • 319
  • 0

How to get Value of selected textbox line to string?

Jul 21 2013 4:41 PM
Hello there guys.

I have a multiline text box. Like this:

57723882
99665588
11225544

So, I have a double click event (currently has wrong code)

I want the string _selectedline to be = the current selected line +".txt, so that, when I doubleclick on an specific line, it will open for example 99665588.txt

The code below is good, but I don't know how to get the string value of the selected line of the textbox.


Thanks Guys

   private void TB_result_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string _selectedline = ""
            System.Diagnostics.Process.Start(_selectedline);
        }

--EDIT--
Related Solved Previous Thread 
http://www.c-sharpcorner.com/Forums/Thread/219731/how-to-display-a-list-of-files-in-a-folder-in-a-text-box.aspx


Answers (7)