Author Topic: How do I use _mfgrepid=  (Read 931 times)

timur

  • Senior Community Member
  • Posts: 205
  • Hero Points: 3
How do I use _mfgrepid=
« on: July 28, 2021, 11:12:38 PM »
I'm trying to modify the Find dialog box so that the "Search Results window" option always says "<New>".  It seems that tbfind.e has changed a lot since the last time I tried to do this, so I'm a bit lost now.

Specifically, I noticed that there seems to be a "_mfgrepid=" option that lets you specify GREP_NEW_WINDOW as the defaults "grep id".  Is this what I want, and if so, how do I set this option?

If _mfgrepid= is not what I want, then what should I do?  I tried modifying _init_grepbuffers(), but that didn't seem to work.

I'm using v23 on Linux.
« Last Edit: July 29, 2021, 03:04:16 PM by timur »

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: How do I use _mfgrepid=
« Reply #1 on: July 29, 2021, 02:32:04 AM »
One way is like this  - add the line shown to the end of the toolShowFind function in tbfind.e

Code: [Select]
   formid.p_user2 = '';
   formid._findgrep.p_text = "<New>";   // <<<<<<<  add this line
   _macro('m', was_recording);
   return;

It might be possible to do it without modifying tbfind.e - something like this

      _control _findgrep;
      formid = activate_tool_window('_tbfind_form', true, '_findstring');
      formid._findgrep.p_text = "<New>";