Forums - C# Corner

Forum guidelines
Sayed Hassan

Sayed Hassan

  • 1.3k
  • 23
  • 11.1k

How to get deselect text from a full text in a combobox

Apr 24 2013 11:52 AM
I need to get read a deselect text from a full text in a combobox where some text are highlighted.
Suppose the searching text is emergency where emer is not highlighted but gency is highlighted.
Now I want to read this deselect text emer to perform operation.
textbox1: emergency (at typing)

textbox2.Text = textbox1.Text.Substring(textbox1.SelectionStart, textbox1.SelectionLength);

I am trying this code variously. But it's not working.

Help me plz.Thanks in advance.

Answers (2)

File APIs for .NET – 25% off Aspose.Total
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more! Use coupon code HOL2016PSB