Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Placing cursor in editboxes
Message
From
29/08/2005 21:59:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/08/2005 21:21:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01044974
Message ID:
01044998
Views:
10
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform