How to place cursor at the end and begining of the text in textbox??????
Oct
13
Welll these days , i am working on a small project and i am actually using textbox.focus() method to make focus on textbox, it is all going well, but the problem is -- it is selecting whole text also, then what i do , i use textbox.deselectall() method to deselect the text, but now again a new problem arises ,it is placing the cursor at the beginning of textbox, and i want to place the cursor at the end of the text, so i come with a very small and interesting code to place cursor at the end of the text in the textbox.... Here is the Code:---
textBox1.Select(textBox1.Text.Length, 0);
Similary,if you want to place cursor at the beginning of the text in textbox, then use this code :---
textBox1.Select(0,0);
Saturday, October 13, 2012 | Labels: Source_Code, Wpf |
- Solved - "Are You Missing An Assembly Reference Error in Visual Studio"
- Binding Property Of Control From Other Control Using XAML in WPF
- Check DropDown List contains a value in Asp.net ????
- How to place cursor at the end and begining of the text in textbox??????
- How To Get Facebook Profile ID
- How To Create Disk Partition on Windows7
- Top 10 Tips To Improve System Speed
Total Pageviews
1082