Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position cursor inside am Editbox
Message
De
19/09/2000 12:38:09
 
 
À
19/09/2000 12:19:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00418109
Message ID:
00418125
Vues:
33
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform