Posted 21 February 2021, 10:57 pm EST
How can i put the cursor at the end of the editor.text after assign a value to it.
I’m using - C1.Win.C1FlexGrid
Forums Home / ComponentOne / WinForms Edition
Posted by: kodees on 21 February 2021, 10:57 pm EST
Posted 21 February 2021, 10:57 pm EST
How can i put the cursor at the end of the editor.text after assign a value to it.
I’m using - C1.Win.C1FlexGrid
Posted 22 February 2021, 4:41 pm EST
Hi,
You can set the cursor position at the end of editor’s text using the below line of code:
(editor as TextBoxBase).Select(editor.Text.Length, 0);
Hope, this will solve your issue.
If this doesn’t work for you then please elaborate your requirement a bit further and share a demo application if possible.
Thanks,
Posted 22 February 2021, 5:24 pm EST
in which event i put this code
Posted 22 February 2021, 5:33 pm EST
Hi,
This is not the event specific code.
You can use above code line after setting the Text in editor.
If this does not work for you then please elaborate your use case and also share an application if possible. So, that we can assist you accordingly.
Thanks,