This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

How do I Invoke the "Find Dialog" from a TButton Press in LMDRichEdit ?

How do I Invoke the "Find Dialog" from an LMDRichEdit ? It is Invoked from the Binoculars on the "Find" Toolbar.  Want "Find Dialog" to appear with Ctrl+F or a TButton Press.

Thanks in Advance...

Comments

  • One way will be to use standard TFindDialog component along with rich edit's FindTextExt and ReplaceTextExt methods. This is what actually happens inside the built-in action.

    Another (somewhat simpler) way is to use the action itself directly. You can use TActionList component, add TLMDRichEditFind action to it via the list component editor (New Standard Action). And then call added action's Execute method: 

    LMDRichEdit1.SetFocus;
    LMDRichEditFind1.Execute;

    in appropriate places. Please keep in mind that rich edit actions work with currently focused editor, so, you have to use SetFocus before action's Execute call. 

Sign In or Register to comment.