Robert Pointon wrote:

I am trying to highlight text in a memo from code. The app has a memo
where the user can store text for pasting into there work by
highlighting it. When the memo reloads at startup I want the previously
selected text to be highlighted. I am storing the selstart and selLength
values to a file then re applying them when the form is reloaded. This
makes the required text the selected text and the paste works, but the
selected text is not highlighted. Can anyone help?

Are you doing a Memo1.SetFocus after inserting the text and setting SelStart and SelLength? If the Memo doesn't have the input focus the selection is not visible.

Stephen Posey
[EMAIL PROTECTED]




_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to