>>Check out the SelStart property.
>
>The problem is that I want to set the selstart property from outside the control. When the control regains the focus, the cursor is repositioned in the begining of the edit box.
>
>I want to click on a button in the form and that button is trying to set the selstart property of the editbox (after doing some other stuff). When the focus gets back to the editbox the cursir is always in the begining
Add a custom property to your editbox superclass - something like nRealSelStart - default to -1.
from outside the editbox, set editbox.nRealSelStart =
nIn the editbox superclass :
IF this.nRealSelStart>0
this.SelStart = this.nRealSelStart
ENDIF
this.nRealSelStart = -1
Insanity: Doing the same thing over and over and expecting different results.