Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position cursor inside am Editbox
Message
From
19/09/2000 12:38:09
 
 
To
19/09/2000 12:19:28
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00418109
Message ID:
00418125
Views:
31
>>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 = n
In the editbox superclass :
**GotFocus() event
IF this.nRealSelStart>0
  this.SelStart = this.nRealSelStart
ENDIF

** LostFocus() event
** reset the property
this.nRealSelStart = -1
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform