Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rich TextBox Ctrl
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00501736
Message ID:
00502899
Vues:
19
>Hi,
>
>I'm looking for the simpliest way to get the line number where is located my cursor in a Rich textbox control?
>
>Any suggestion would be appreciate.
>
>Thanks
>
>Luc

Luc I didnt see any property for it but you can try this... I tried it in the DoubleClick method of a richtext control.
LOCAL lnCursorPos, lnChars
LOCAL lnLines, laLines[1], i, lcLine, lnLineLength
lnCursorPos = this.selstart
lnChars = 0
lnLines = ALINES(laLines,This.Text)
FOR i = 1 to lnLines
	lcLine = laLines[i]
	* MESSAGEBOX(lcline)
	lnLineLength = LEN(lcLine)
	lnChars = lnChars + lnLineLength
	* MESSAGEBOX(lnLineLength)
	IF lnCursorPos 		* MESSAGEBOX("Cursor is positioned on line " + ALLTRIM(STR(i)))
		EXIT
	ENDIF
ENDFOR
RETURN i  && line number
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform