Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Placing cursor in editboxes
Message
De
29/08/2005 21:59:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01044974
Message ID:
01044998
Vues:
9
>Hi Hilmar
>tried something like below but
>
>*--go thru log and place pointer on error.
>FOR lncnt= .pn_errorline TO ALINES(laArray,lcString)
>m.lnerrNumber = VAL(ALLTRIM(Getword(ALLTRIM(SUBSTR(laArray[lncnt],AT(' ',laArray[lncnt])+1)),1))) && it just gets value from string
>
>IF m.lnerrNumber > 0 && we found an error
>.pn_errorline = m.lncnt && this is where we start from next time
> *--now place cursor
> This.parent.Beditbox1.SelStart = m.lncnt
> This.parent.Beditbox1.SelLength = LEN(laArray[lncnt])
> EXIT
>ENDIF
>ENDFOR
>
>its locating record i want but not placing the cursor on the line i want.what am doing wrong ??

.SelStart works with characters, not lines. If I understand correctly, you want to go to line #x. You would have to calculate the position in characters with some other function.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform