In a text box, how do you get it to have the selecting thing (no clue what its called) to start at the beginning of a line if you input a line number into a textbox?

Or easier to say, how would I go about doing goto like in Notepad?