?
Solved

How to move cursor to the end of a field (not begining)?

Posted on 2011-02-17
3
Medium Priority
?
1,146 Views
Last Modified: 2013-12-18
Here is a piece of my lotus script code when a button is pressed:
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument

uidoc.EditMode = True
Call uidoc.GoToField( "fieldName")

Open in new window

It puts the cursor in the field that will be edited. The problem is that the cursor goes to the begining of the field. When the field is quite long, it takes time to scroll down to the end of the field when some one is trying to add some text to the field. Is there a way to change the code and make the cursor go to the end of the fiield?
0
Comment
Question by:dominoPgr
3 Comments
 
LVL 22

Accepted Solution

by:
mbonaci earned 2000 total points
ID: 34922071
How about using @Formula?

If it's not the last field on your form, first position the cursor in the field to the right/bellow of your field and then use EditLeft to simulate pressing left arrow key on a keyboard:
@Command( [EditGotoField] ; "TheNextFieldName" )
@Command( [EditLeft] ; count )

Open in new window


If it's the last field on your form (the same as pressing Ctrl+End):
@Command( [EditBottom] )

Open in new window



You can try to do the same with LotusScript using:
    Call notesUIDocument.GotoBottom
    Call notesUIDocument.GotoField("fieldName")
    Call notesUIDocument.GotoPrevField
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 34924690
If that doesn't work, or you don't want to rely on the visibility of other fields, try this one:
http://benpoole.com/articles/sendkeys

Call uidoc.GoToField( "fieldName")
PushKeys("{^End}")

I might have the syntax wrong, so please check.
0
 

Author Closing Comment

by:dominoPgr
ID: 34928043
Using formula command EditLeft worked. Thank you!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question