Home > Archive > Programming with dBASE > October 2005 > Cursor position









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Cursor position
Charles

2005-10-24, 8:24 pm

I have a module that pre-loads information to an editor box. I want to position the cursor at the of the last line so I can enter additional info without having to use the mouse. Just setting focus to the editor puts the cursor at column 1, row 1. How
can I get the cursor to the end of the last line programatically?

Charles
Marc Hamelin

2005-10-24, 8:24 pm

Try this:

form.editor1.keyboard("{Ctrl+End}")
form.editor1.keyboard("{Home}")

Marc Hamelin


Marc Hamelin

2005-10-24, 8:24 pm

After re-reading our post, I realized you wanted to get to the end of the
last line. Try this instead:

form.editor1.setfocus()
form.editor1.keyboard("{Ctrl+End}")

Marc Hamelin


Charles

2005-10-24, 8:24 pm

Marc Hamelin Wrote:

> Try this:
>
> form.editor1.keyboard("{Ctrl+End}")
> form.editor1.keyboard("{Home}")
>
> Marc Hamelin



Thanks!

Charles
Charles

2005-10-24, 8:24 pm

Marc Hamelin Wrote:

> After re-reading our post, I realized you wanted to get to the end of the
> last line. Try this instead:
>
> form.editor1.setfocus()
> form.editor1.keyboard("{Ctrl+End}")
>
> Marc Hamelin


Works much better. Thanks again.

Charles
>
>


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com