Select EditField text when focus changes

    • Offizieller Beitrag
    Zitat

    I have some inputeditfields in my document. Cursor walks from field to field by using tab key. I would like to select the actual *content* of the fields in the moment they get the focus. No problem so far - but my field limiters get selected too. I would like to select *only* the content of the field so that I can delete it but leave the field itself and its limiters unselected in the document. Any hints?

    This functionality requires an delayed selection of the field since after the EditFiedFocus event was triggered the selection is usually cleared.

    Please add to your interface section:

    Code
    const  WM_SELECTFIELDATCP = WM_USER + 100;TForm1 = class(TForm)protectedprocedure WMSelectFieldAtCP(var Message : TMessage); message   WM_SELECTFIELDATCP; end;

    Then add this procedure and an event handler for the WPRichText OnEditFieldFocus event: