Passing info to default actions (find dialog wpasearch1)

  • In my app, execution of the default action wpasearch1 brings up the find dialog box and in the find text is always the first paragraph of my file.
    I want to clear the find text each time the dialog is called.

    It doesn't seem the WP default actions give access to the dialog properties like the regular default actions do. Meaning the action property has no dialog sub property like windows standard actions for dialogs do.

    Can the find and find/replace default dialogs be modified prior to display and execution or do I have to create my own custom dialogs using the wprichtext.finder ?
    -d

    • Offizieller Beitrag

    Hi,

    it should be easy to create a TAction which calls TWPRichText FindDialog or ReplaceDialog method.

    This method has this parameters:

    //:: Show the Search Text dialog. You can pass the initial text or '@SELECTED@' to use the first 60 characters of the selected text
    function FindDialog(initaltext : string = ''): Boolean; //V5.36
    //:: Show the Replace Text dialog. You can pass the initial text or '@SELECTED@' to use the first 60 characters of the selected text
    function ReplaceDialog(initaltext : string = ''): Boolean;

    Julian

  • Yes, I pass:
    wprichtext1.FindDialog('');
    in before execute of wpasearch1 action.
    It works the first time the find dialog comes up, but the next time the action executes, it never clears the text again.