TextBox Selection
-
Hi Is it possible to disable selection of text inside a Textbox when the textbox is in enabled mode. All comments welcome...... Regards Deepak.S
Is it Windows Forms or ASP.NET Textbox? If it is latter, you can use JavaScript to do that. Deepak Kumar Vasudevan Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/
-
Is it Windows Forms or ASP.NET Textbox? If it is latter, you can use JavaScript to do that. Deepak Kumar Vasudevan Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/
-
Sample code - Would be to trap mouseup and Keydown events and check for selectedText property private void textBox1_MouseUp(object sender, MouseEventArgs e) { //this.Text = textBox1.SelectedText.ToString(); if (textBox1.SelectedText.Trim().Length != 0) { textBox1.SelectionLength = 0; } } Dont forget to add in code for Keydown and copy+Paste in Textbox stuff.