c# - how to set the cursor position in a non textbox component -
I am working with a component named SpinAid whose text is property, how do I set the cursor position in this component?
Unless this select-list
property, or similar
Text
property is a string, which does not have any connection with the cursor in the editor.
If it selects
int
value, for example, to set the cursor at the beginning of the control:
control. SelectionStart = 0;
To set the cursor to the end of the control:
control. Selection-start = Control Lesson Lang -1;
However, this will only work when is the property of the control you are using and it allows it to be set. You have not specified where the control comes from, unless you give us more information, there is nothing that we can do to help.
Comments
Post a Comment