Page 1 of 1

cursor

Posted: Fri Aug 07, 2009 12:24 pm
by ConvertFromOldNGs
by ellenw >> Fri, 8 Aug 2003 5:04:31 GMT

Hey, I have a textbox for user write down comments,
and I like set the cursor in the very beginning of the textbox
every time.has anyone had any experience with cursor default ?


Thanks.
Ellen.

Re: cursor

Posted: Fri Aug 07, 2009 12:24 pm
by ConvertFromOldNGs
by Robert >> Fri, 8 Aug 2003 9:01:32 GMT

The cursor is set to the first position in the textbox when it receives focus, so perhaps your textbox does not have focus when it first appears. You may just need to change the tab order on your form, or use the TextBox.setFocus() method - where you call this depends on your form layout ... perhaps in the form's load method, or a Folder.sheetChg event.

You can set the cursor position (text insertion point) elsewhere using the selStart property, and specify selection of existing text within the textbox by using the selLength property.