Re: Find/Replace
- From: Robin Baxter <RobinBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Apr 2005 10:29:03 -0700
Fred,
Thanks for this further information, however, I am still having problems
with this. If I just add the following two statements (just to try it) in
the Init code of my form, I just get an 'Edit' option on my menu, with a
'Find' sub-option which is greyed out.
The statements I have include are:
DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
DEFINE BAR _med_find OF _Medit PROMPT "Find" KEY CTRL+F, "CTRL+F" MESSAGE
"Fidn a string"
Prior to this, I just had a statement
SET SYSMENU TO _MSM_EDIT
in my code, and this does put in the Edit menu, and the Cut, Copy and Paste
options are activated automatically as normal, and do work. However, the
Find and Replace are never activated.
I am using Visual FoxPro Version 6. Do you think this has any bearing?
What version are you using? Do the Find and Replace options get activated on
yours?
Regards,
Robin Baxter
"Fred Taylor" wrote:
> First do a Quick Menu:
>
> 1) MODIFY MENU quick
> 2) From the Menu menu, choose quick menu
> 3) From the Menu menu, choose Generate...
>
> You should now have a quick.mpr program.
>
> From here, edit this file:
> MODIFY COMMAND quick.mpr
>
> Find the "DEFINE POPUP _medit" section and cut and paste the pieces of that
> you want into a separate .PRG For example, if I only wanted CtrlA (Select
> All), CtrlX (Cut), CtrlC (Copy), and Ctrl V (Paste), I'd only copy those
> commands:
>
> DEFINE POPUP _medit MARGIN RELATIVE SHADOW COLOR SCHEME 4
> DEFINE BAR _med_cut OF _medit PROMPT "Cu\<t" ;
> KEY CTRL+X, "Ctrl+X" ;
> PICTRES _med_cut ;
> MESSAGE "Removes the selection and places it onto the Clipboard"
> DEFINE BAR _med_copy OF _medit PROMPT "\<Copy" ;
> KEY CTRL+C, "Ctrl+C" ;
> PICTRES _med_copy ;
> MESSAGE "Copies the selection onto the Clipboard"
> DEFINE BAR _med_paste OF _medit PROMPT "\<Paste" ;
> KEY CTRL+V, "Ctrl+V" ;
> PICTRES _med_paste ;
> MESSAGE "Pastes the contents of the Clipboard"
> DEFINE BAR _med_slcta OF _medit PROMPT "Se\<lect All" ;
> KEY CTRL+A, "Ctrl+A" ;
> PICTRES _med_slcta ;
> MESSAGE "Selects all text or items in the current window"
>
>
> Save it as say "cutandpaste.prg". Now you just call this in the Init of
> your form (DO cutandpaste) and you'll have access to these functions in your
> form. You don't see the menu with those options, but they are available for
> you to use.
>
> --
> Fred
> Microsoft Visual FoxPro MVP
>
>
> "Robin Baxter" <RobinBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:2A03DD06-D9EF-437D-BF17-40B8755856C0@xxxxxxxxxxxxxxxx
> > Would you mind providing an example of what you would expect to see in
> > this
> > 'dummy .MPR program'. What do I need to include in the Init code to
> > enable
> > just the Find menu option?
> >
> > "Fred Taylor" wrote:
> >
> >> Create a dummy .MPR program that contains the setup for those menu items
> >> in
> >> the init of your modal form. The menu itself doesn't have to be made
> >> visible, only the that the pads are available.
> >>
> >> --
> >> Fred
> >> Microsoft Visual FoxPro MVP
> >>
> >>
> >> "Robin Baxter" <RobinBaxter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:55331487-442C-468D-9B68-F1C815305C11@xxxxxxxxxxxxxxxx
> >> >I am using modal forms to edit text fields in an application (VFP6), and
> >> > cannot get the Find/Replace menu options from the edit menu to
> >> > activate.
> >> > Copy/Paste always seems to be available, but Fin and Replace are not.
> >> > If
> >> > I
> >> > have a non-modal window, they are activated, but I really want to use a
> >> > modal
> >> > window.
> >> > If I cannot get the menu options to activate as required, can I call
> >> > any
> >> > functions directly from code to do this? I would be happy to put a Find
> >> > button on the form to activate a call to the function, but cannot find
> >> > what
> >> > function to call.
> >> >
> >> > Thanks in anticipation.
> >> > Robin
> >>
> >>
> >>
>
>
>
.
- Follow-Ups:
- Re: Find/Replace
- From: Fred Taylor
- Re: Find/Replace
- References:
- Find/Replace
- From: Robin Baxter
- Re: Find/Replace
- From: Fred Taylor
- Re: Find/Replace
- From: Robin Baxter
- Re: Find/Replace
- From: Fred Taylor
- Find/Replace
- Prev by Date: Re: Find/Replace
- Next by Date: Re: Find/Replace
- Previous by thread: Re: Find/Replace
- Next by thread: Re: Find/Replace
- Index(es):
Relevant Pages
|