"Nothing changes
your opinion of a friend so surely as success - yours or his."
Franklin P. Jones, Saturday Evening Post, November 29, 1953 |
Read
first then play the video:
FRM-VIDEO -(Hands-On
14) How to use Pop up menu
Pop up menu
Introduction
Pop-up menus are
"mini-menus" that appear when you right click on an object.
They are intended to include only items relevant to the object they
are attached to. Therefore an application may have many pop-up menus.
Pop-up menus do not have module files. They are owned by the FORM
modules.
Hands-On
Your client wants to have
capability to cut, paste, and copy words or lines when they type their
comments in the "comments" item at the "Customer"
tab canvas.
You have been assigned to
add the above functions into the "comments" item in their
application.
See Figure 16.
Your tasks are:
1- Add more functionality
into the "comments" text item.
2- Create pop-up menu to
have cut, past, and copy functions.
3- Associate pop-up menu to
the "comments" item.
4- Run and test all user
functional requirements.
F You will learn how
to: create "pop-up" menu, with following functionality
"cut," "paste," and "copy," use tab canvas,
use "object navigator," use "Data Blocks," use "Layout
Editor," use "Property Palette," use "Run Form," and "Execute
Query."

Figure 16
Open a Module
In the "Object Navigator"
window, highlight Forms. Go to the Main menu and choose "File,"
select "Open" to open an existing form (customer_orders_V13)
from the "iself"
folder.
Save a Module
Click on the "CUSTOMER_ORDERS_V13"
form. The color changes to blue. Then change the name and save the
Form name as version 14 (customer_orders_v14). This way the
original form is untouched.
Layout Editor
Go to the Main menu and
choose the "Tools" option and select "Layout
Editor." Adjust the window if needed.
In the Layout Editor, make
sure that the Canvas box contains Canvas Tab name (CANVASn) and the
Block box contains Customer.
Create a Popup Menu
In the Object Navigator,
select the "Popup Menus" item and click on the
"Create" icon (Green "+"). A popup menu will be created
for you (MENUnn).
Change a popup menu"s
name
Highlight the object (MENUnn)
and click again to change its color to blue. Then type its new name
EDITOR_TOOLS.
Open Menu Editor for a
popup menu
Double click on the
EDITOR_TOOLS icon, the Menu Editor window will be displayed.
In the Menu Editor, you can
change the layout and property of each item in the menu. You can add,
remove, change the Menu items.
In the toolbar of the Menu
Editor, you can find very useful icons. There are the "Create Right"
icon, "Create Down" icon, and "Delete" icon. If you move your
cursor on them, a tooltip will display their functions.
Add items into a popup menu
Change "new_itemnn"
to "Cut" and press the enter key.
Click on the "Create
Down" icon, change " new_itemnn " to "Copy,"
and press the enter key.
Click on the "Create
Down" icon again, change " new_itemnn " to
"Paste," and press the enter key.
Right click on the Cut item
and open its Property Palette. Change "Menu item Type" to
"Magic" and "Magic item" to "Cut." Then
close the window.
Right click on the Copy
item and open its Property Palette. Change "Menu item Type" to
"Magic" and "Magic item" to "Copy." Then
close the window.
Right click on the Paste
item and open its Property Palette. Change "Menu item Type" to
"Magic" and "Magic item" to "Paste."
Then close the window.
Exit Menu Editor
Now, close the Menu Editor
windown.
Assign a popup menu to an
item
In the Layout Editor, right
click on the COMMENTS item and open its Property Palette.
In its Property palette, go
to the "Popup Menu" item and click on the Down Arrow to display
all existing Popup Menus. You should see EDITOR_TOOLS. Assign "editor_tools"
to "Popup menu." Then, close the window
Compile and run the Form
Compile and run the
application Form.
Execute Query
Click on "Execute query."
Move the cursor to the
"Comments" item and right click on it. The "Popup
Menu" will be displayed. You should see all the options such as
CUT, COPY, and PASTE.
Select a portion of the
text, right click on it, then copy and paste it.
Select a portion of the
text, right click on it and cut the selected text.
Save the changes.
Copy the whole text and
paste it to the "NEXT" record.
Save the transaction.
Navigate through the
application Form.
After testing the
application, close the window and save the changes.
"Now, I say to you
today my friends, even though we face the difficulties of today
and tomorrow, I still have a dream. It is a dream deeply rooted
in the American dream. I have a dream that one day this nation
will rise up and live out the true meaning of its creed: - 'We
hold these truths to be self-evident, that all men are created
equal.'" Martin Luther King Jr. (1929 - 1968), Speech at Civil
Rights March on Washington, August 28, 1963 |
Questions:
Q: Describe a Pop-Up menu
in a Form Module.
Q: How do you create a
Pop-Up menu?
Q: Your client wants to
have capability to cut, paste, and copy words or lines when they type
their comments in the "comments" item at the
"Customer" tab canvas.
You have been assigned to
add the above functions into the "comments" item in their
application.
See Figure 16.
Your tasks are:
1- Add more functionality
into the "comments" text item.
2- Create pop-up menu to
have cut, past, and copy functions.
3- Associate pop-up menu to
the "comments" item.
4- Run and test all user
functional requirements.
|