Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending the cursor to the end of textfield !!!
Message
 
 
À
22/09/2000 08:54:32
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00419663
Message ID:
00419675
Vues:
19
End your code with:

This.SelStart = len(trim(This.Value))

For other ways of getting the cursor at the end of a textbox's value, you have to set SelectOnEntry to .F., and you can not have K in the Format property. To handle cursor placement if a user TABs into the field, in the GotFocus put the following code:

DoDefault() && to run any code in the parent -- this is optional
This.SelStart = len(trim(This.Value))

If you want the cursor at the end if the user clicks in the text box, also put the code in the Click of the textbox.

>In my textfield.keypressed i have this
>
>LPARAMETERS nKeyCode, nShiftAltCtrl
>
>do case
>case nkeycode = F3
> this.value = "BUY"
>case nkeycode = F4
> this.value = "SEEL"
>case nkeycode = F5
> this.value = alltrim(this.value) + " EUR"
>case nkeycode = F6
> this.value = alltrim(this.value) + " USD"
>case nkeycode = F7
> this.value = alltrim(this.value) + " PTE"
>endcase
>keyboard chr(6) && END key
>
>the problem is the cursor stays allways in the beginnig of the textfield and i want it in the end.
>
>What to do ??? what to do ???
>
>Thank you ALL
>
>João
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform