Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

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

  • 1 Comment sorted by Votes Date Added
  • 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.