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
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;
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.
The dialog is non-modal - this is why it is not cleared. Look into unit WPCtrRich to see how it was implement. You can borrow the code to implement a find dialog to Your liking.
#4♥ 0
This category is archived. No new posts are possible.