I have a text box. I need to get extract the highlighte开发者_开发问答d and copy that to another text box. User will highlight it after typing.
How to do it? Thanks Furqan
Use the SelectedText property (also available in XAML, if you’re using WPF instead of WinForms):
OtherTextBox.Text = FirstTextBox.SelectedText
Assuming you are talking about a System.Windows.Control, you can grab the SelectedText on the SelectionChanged event.
加载中,请稍侯......
精彩评论