User Profile
Collapse
-
Thanks for pointing me to the 2 functions. They look like they can be used for a more elegant solution than mine.... -
I actually figured out a way to do it that involves using the SelectionStart property. I tried to allow for cases where the user clicks on the first line, clicks in the very first character possition, the last line or after the last line. I have not tried it much but this seems to work as I intended:
...Code:private void StatusTextBox_DoubleClick(object sender, EventArgs e) { int StartOfLine;Leave a comment:
-
How do I tell which line has been doubleclicked in a multiline textbox
I am using VisualStudio 2005 to create an application in C#.
I have a scrollable, multiline textbox where I want the user to be able to doubleclick any given line to put that line in another textbox. How do I tell which line has been doubleclicked? The event argument contains only x,y information and I don't want to have to do the math to figure out which of the visible lines contains that point.
Any ideas?
No activity results to display
Show More
Leave a comment: