Modify the focus on a control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to actually force a focus to change it's position? E.G TextBox.Focus.MoveRight(1); or somekind of method that can move it?

jax
 
hi jax
if it is a textbox that you want to inforce focus in certain postion on
then you can do it this way ...
first , use the select method get the postion where you want to
set the focus
eg: this.textBox1.Select(2,3); // this
will select 3 characters from the textbox starting the 2 index character
then you set the focus to the text box
eg:this.textBox1.Focus();// set the focus
"to the selected characters" inside the textbox
hope this answer your question
 
Back
Top