Move cursor to end of field

Does anyone out there know how to move the cursor to the end of the text in a text field on entry to the field? I must be going senile - I can’t believe that this isn’t possible, but I cannot for the life of me find any way to achieve it.

I’ll take anything - formula, Lotuscript, javascript - whatever works…

Stephen Lister

Subject: Move cursor to end of field

I’ve had a look and cannot find a way either. My only thoughts are to try some platform specific dll’s (sharp intake of breath), such as execute a windows command to perform the appropriate number of cursor right commands.

Alternatively you could always tab backwards to the field :wink:

Subject: RE: Move cursor to end of field

Found a trick to do this

Call uidoc.FieldAppendText(“Body”, "#####CursorPointer#### ")

Call uidoc.GotoField(“Body”)

Call uidoc.FindString(“####CursorPointer####”)

Call uidoc.Clear

Regards

Cédric

Subject: js that works in IE, not in R5 maybe in N6

Courtesy of http://www.faqts.com/knowledge_base/view.phtml/aid/17749/fid/53

in onfocus event

function setCaretToEnd (el) {

if (el.createTextRange) {

var v = el.value;

var r = el.createTextRange();

r.moveStart('character', v.length);

r.select();

}

};

setCaretToEnd (this.form.TXT1)

Subject: Try this…

@Command([EditGotoField]; “RTField”);@Command([EditSelectAll]);

@Command([EditCut]);

@Command([EditPaste])

Subject: RE: Try this…

Great idea Bill - lots of screen flicker though :frowning:

I can’t believe that there isn’t a method for doing this built in…

Stephen Lister

Subject: in Notes this LS cludge works.

My concern is that the my clipboard in Notes gets flaky occasionally (your mileage may vary).

Sub Entering(Source As Field)

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc = workspace.CurrentDocument

Call uidoc.selectAll

Call uidoc.cut

Call uidoc.paste

End Sub