Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't SelStart work?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Why doesn't SelStart work?
Divers
Thread ID:
00125098
Message ID:
00125098
Vues:
63
I have a textbox field on a form.

At the bottom of the form, I have a push button to a foreign character listbox on another form. Whilst editing the textbox field, I want to return a selected foreign character back from the listbox/form, and insert it into the textbox at the position I was last when I hit the push button.

This is my code in the push button's click event -

LOCAL cChar
cChar = ""
nSelStart = THISFORM.txtAddress.SelStart
DO FORM eForeign TO cChar

WITH THISFORM.txtAddress
IF !EMPTY(cChar)
.Value = STUFF(.Value,.SelStart + 1,0,cChar)
.Refresh()
ENDIF
.SetFocus()
ENDWITH

Unfortunately, it doesn't work. Mainly because "nSelStart" always is returned as zero - I checked it out through the debugger.

Can anyone please provide a solution. I have searched the "thread" without success.

Thanx in anticipation.

Rex Toomey
Australia.
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform