Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editbox and set focus 1

Status
Not open for further replies.

wlhbill

Programmer
Aug 25, 2002
20
0
0
US
I am using an editbox to display customer service notes from a memo field. I want to be able to set the focus to the end of the existing text so the CSA can type in more notes without having to first position the cursor to the end of existing notes.
I hope i'm overlooking a deceptively easy way of doing this.
Thanks in advance.
 
The 1st thing that comes to mind is:

(in the form INIT)

thisform.myeditbox.setfocus
keyboard '{ctrl + end}'

Jim
 
In the GotFocus() event, place the following:

THIS.SELSTART = LEN(ALLT(THIS.VALUE))

Darrell

'We all must do the hard bits so when we get bit we know where to bite' :)
 
If you are using a record navigation control,
you should place the previous code in the refresh()
method of the editbox instead.

Darrell

'We all must do the hard bits so when we get bit we know where to bite' :)
 
Thanks Darrell,
That's the 'deceptively easy way' I was overlooking!
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top