tags:

views:

38

answers:

1

I m developing winform application with C#.Net.

alt text

How can reach selected text with mouse? Text area is Label Control.

+2  A: 

Your question is not very clear, but assuming that the text area is a RichTextBox control, just use the SelectedText property. You can use the SelectionStart and SelectionLength properties as well if needed.

Ed Swangren
thanks. I just need selected area text. It could be string format. I can split and process it.
Jack
All controls that you can select text in have a SelectedText property, and all inherit from TextBoxBase. However, Label isn't one that you can select text in.
R. Bemrose
Good point, I suppose I have just never had a reason to use those properties in anything but a RickTextBox. Either way, is this solved for you Jack?
Ed Swangren
I m struggling with this, but I couldnt solve yet.
Jack