Good. Although I'm not sure that you need to select all of the text
and then move the cursor to the end of the selected text. I would
think that it will work from the button as you wish by just moving
the cursor to the end of the text:
Sub Action()
// Add Date Stamp Code
Dim d as New Date
pNotes.text = pNotes.text + EndOfLine + "[" + d.longdate + "] - "
//pNotes.SelLength=len(pNotes.Text)
//pNotes.SelStart = pNotes.SelLength
pNotes.SelStart = len(pNotes.Text)
pNotes.SetFocus
End Sub
Best,
Jack
On Jan 10, 2006, at 12:19 AM, Jonathon Bevar wrote:
Jack,
I worked on it a bit more and I got this to work perfectly.
// Add Date Stamp Code
Dim d as New Date
pNotes.text = pNotes.text + EndOfLine + "[" + d.longdate + "] - "
pNotes.SelLength=len(pNotes.Text)
pNotes.SelStart = pNotes.SelLength
pNotes.SetFocus
So now after you click on the Add Note button, the DATE is entered
and then
you can start typing without moving the mouse to pre-focus the
cursor after
the " - ".
I like this method as many people have asked for an auto date stamp
feature
that will allow them to enter the date to which the note or comment
was
added.
On Jan 9, 2006, at 8:10 PM, Jonathon Bevar wrote:
// Add Date Code
Dim d as New Date
pNotes.text = pNotes.text + EndOfLine + "[" + d.longdate + "] - "
Should look like this:
[Friday, January 7, 2006] -
It will auto enter the DATE fine but it will not put the focus
after the " - ".
How do I get the focus put after the " - "?
// Add Date Code
Dim d as New Date
pNotes.text = pNotes.text + EndOfLine + "[" + d.longdate + "] - "
pNotes.SelStart = len(pNotes.Text) <---------------------
Best,
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>