Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selstart,sellength not working
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01128669
Message ID:
01128776
Vues:
29
Peter,

You need to change the value of the HideSelection property of the edit box to .f.

You also need to remove the SelText assignment and correct the SelStart, also the Refresh is not necessary, it should look like this:
IF x1>0
	thisform.edit1.selectedbackColor=RGB(255,0,0)
	thisform.edit1.SelStart=x1-1
	thisform.edit1.SelLength=LEN(xx1)
ENDIF
>i have an editbox and the following code (simplified) does NOT highlight the text:
>
>xx1=UPPER(ALLTRIM(thisform.text1.Value))
>xx2=UPPER(thisform.edit1.Value)
>
>x1=AT(xx1,xx2)
>
>IF x1>0
>	thisform.edit1.selectedbackColor=RGB(255,0,0)
>	thisform.edit1.SelStart=x1
>	thisform.edit1.SelLength=LEN(xx1)
>	thisform.edit1.SelText=xx1
>	thisform.edit1.Refresh()
>	>ENDIF
>
>
>
>what am I missing???
>
>thanks
>
>
>Peter
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform