Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Edit cursor position in EDITBOX control in a Grid (VFP5)
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Edit cursor position in EDITBOX control in a Grid (VFP5)
Miscellaneous
Thread ID:
00159968
Message ID:
00159968
Views:
72
Hi All,

I have an EDITBOX in one of the columns of a grid. SPARSE is set
FALSE.

If the end-user scrolls a particular EDITBOX to read its contents, and
then clicks on the same EDITBOX in another row, that EDITBOX on the
new row positions its contents at the same character position as that of the EDITBOX the
end-user just left.

To get rid of this unwanted effect I have put a
KEYBOARD "{CTRL+HOME}" in the LostFocus Event of the EDITBOX. This
works to a point in that if you go from one EDITBOX to the same
EDITBOX in another row but in the same column, the Ctrl+Home repositions
the cursor at the beginning of the new EditBox's contents.

But it is not perfect. If you leave the EDITBOX and click on a
DIFFERENT row but not in the same column, then it still occurs : the
EDITBOX in the NEW ROW but in the SAME COLUMN as the column you just
left, repositions itself at the same character position as where you had left the
EDITBOX in the last row you were at (this could be
lines and lines after the first word!).

Has anyone works something that gets round this ?

Michel Creppy.
Next
Reply
Map
View

Click here to load this message in the networking platform