On Nov 30, 2007, at 11:30 AM, Michael Diehr wrote:
> If you have text field which serves as a log, what's the fastest way
> to append to it?
>
> either
> editField.SelStart = editField.text.Len
> editField.SelText = data + EndOfLine
>
> or
> editField.text = editField.text + data + EndOfLine
>
> e.g is it faster to Insert using .SelText, or to just replace the
> whole .Text object?
No! Instead, use EditField.AppendText. That's what it's for; it
will not only be faster, but also avoid screwing up the selection and
scroll position.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|