Step 4. Implement Memo Box Copy/Paste Methods (Optional)
VFW054 – Edit Text in a Memo / Edit Box
If you examine the Memo box
you will find it supports and .will copy selected text to the Windows clipboard. The method can be actioned programatically or by the user using the standard shortcut keys, such as Ctrl+C
Note that there are other Methods available such as
, which you should investigate later. Once again Feature Help (F2) will provide more information.In this step you will implement some of these methods using a Pop-Up menu.
1. In the
view, select the Memo box, select on the tab and drag and drop a component onto it. The will be displayed at the top of the tab.
You create can Menu items by typing their
, then pressing to create the next menu item.The first
component is named PMNU_1, and are named MITM_1, MITM_2 etc.A component, such as the
will have its property set to the name of the which was dropped onto it.Typing a dash into a menu
makes this menu item a . Its purpose is to visually separate different parts of the menu.2. In this step you will define the
. If the first menu item (Item1) is not displayed at the top of the tab, use the context menu on the Memo box to .a. Replace the Item1 text with Copy and press
.b. Enter Paste and press Enter.
c. Type a dash (-) character into the next menu item, and press enter
d. On the new menu item, type Select All and press Enter.
e. Type dash into the next menu item and press Enter.
f. Type Find into the new menu item
g. Save your changes.
Your
should now look like the following:
3. Create a Click event handling routine for each menu item. To do this, simply position in each menu item and use the tab.
Note that you could have renamed each menu item (for example, MITM_COPY) for example. This is recommended in your own applications. It will make future maintenance much easier.
4. Complete each menu item
event so that it invokes the relevant Memo box component method. For example:Evtroutine Handling(#MITM_1.Click)
#MEMO_1.copy
Endroutine
5. Compile your component.
6. Execute the Framework as End User and test your
command handler and the functions.For example you could copy and paste within the same Employee's notes or switch to another employee's
to copy into that one.Test the
and functionality.