Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where M I in memo while editing in EditBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00226121
Message ID:
00226178
Vues:
24
>>>>>Is there any way to find which position Iam In memo. i.e. which row , column
>>>>>
>>>>>TIA
>>>>
>>>>There isn't any readymade func available but you can write some code to do it.
>>>>For example, I have found out which Row are you on as follows.
>>>>
>>>>WITH ThisForm.edttry
>>>> lcText = LEFT(.Value,.SelStart)
>>>>ENDWITH
>>>>?'Rows : ' + STR(OCCUR(CHR(13),lcText) + 1)
>>>>
>>>>Try to extend the code above and you will get the column position too.
>>>>
>>>
>>>There's a problem with this approach; with word wrap, there aren't hard carriage returns to count.
>>>
>>>>Bye
>>>>Jayesh
>>
>>I am trying to get the Line no of the memo field not the Edit Box Control. Anyway, It isn't fully tested bit. It just gives a head start to Diptesh.
>
>Again, it won't work with a memo field, either, because of line wrap variations because of SET MEMOWIDTH; if you have memowidth set to 70, and you have 130 characters without a carriage return, the line count from your method would be line 1, while MEMLINES() would return 2.

As I have said before, I wrote this code just in a minute or two and didn't tested it throughly. Let's stop it here.
- Jayesh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform