To add a popup menu for the
Travel Agency catalog, these steps were taken:
1.
|
Define a new decision called OPEN_RESERVATIONS, and copy the
double-click action text of Tree View Node 3 of the Scheduled Tours
tab page into its Yes Action. |
2.
|
Define a new decision called VIEW_SCHEDTOUR, and copy the Yes
Action of the decision OPEN_RESERVATIONS into its Yes Action. |
A ScheduledToursFromCatalog
window can be defined in the same manner as the
ReservationsFromCatalog window.
3.
|
Define a new decision, called DELETE_SCHEDTOUR, with Yes
Action: |
Question('Are you sure to delete this
Scheduled Tour?', SqlScript(SET showErrorMessages True;
DELETE FROM schedtour WHERE
schedtour_id=
"Tab_1.Page_1.Tree_View_1.GetValueFromCurrentItem(schedtour_id)"),
ActionDoNothing())
4.
|
In the Windows Designer, define a new Menu Page called
SCHEDTOUR_MENU. Then for the new SCHEDTOUR_MENU Menu Page, define
Menu Lines: |
Menu Line
|
Position
|
Action
|
Reservations...
|
1
|
decision(OPEN_RESERVATIONS)
|
View Scheduled Tour
|
3
|
decision(VIEW_SCHEDTOUR)
|
Delete Scheduled Tour
|
4
|
decision(DELETE_SCHEDTOUR)
|
5.
|
Define a menu line with only the following properties set: |
9.
|
This will result in a horizontal line between the first two
menu items. |
10.
|
Identify the menu page from which you want to give access to
the Travel Agency Project Catalog. Add the menu line: |
Menu Line
|
Action
|
Travel Catalog
|
CatalogToggle(Travel Catalog)
|
11.
|
For this menu line, set the On Toolbar property to some high
number, for example: 49, and the Bitmap Name property to:
hierar.bmp. |
12.
|
In the Windows Designer, (re) open the Scheduled Tours tab
page. |
13.
|
For the Tree View object, on the General tab page, set the
Node-specific Menus property to Yes. This way, you can give each
Tree View Node a different Popup Menu. |
14.
|
For Tree View Node 3, on the General tab page, set Popup Menu
Page to: SCHEDTOUR_MENU. |
|