Brett
08-29-2006, 02:24 PM
Having a menu bar in your application will provide a familiar and convenient way for your users to interact with your software. Here is how you do it:
1. Select Project > Menu Bar from the menu.
2. Check the "Show menu bar" option.
3. Customize the menu to have the options and commands that you want. Pay special attention to the Menu ID property of each command as you will need it in order to handle the menu commands.
4. Click OK to close the Menu Bar screen.
5. Select Page > Properties from the menu.
6. On the Script tab, select the "On Menu" event.
7. Enter the following text to handle specific menu commands (adjust the menu ID accordingly:
if e_ID == 101 then
Dialog.Message("Notice", "You selected menu item 101");
end
8. Click OK to accept the script and then select Publish > Preview from the menu and try out the menu command the you handled.
You can use this method to handle all of your menu commands. Just add additional if..then..end blocks for the other commands. Also note that you do not have to handle menu commands on each page, you can handle them for the entire application using the "On Menu" event of the project actions (select Project > Actions) from the menu. For more details about using menus bars, search for "Menu Bar" in the help file.
1. Select Project > Menu Bar from the menu.
2. Check the "Show menu bar" option.
3. Customize the menu to have the options and commands that you want. Pay special attention to the Menu ID property of each command as you will need it in order to handle the menu commands.
4. Click OK to close the Menu Bar screen.
5. Select Page > Properties from the menu.
6. On the Script tab, select the "On Menu" event.
7. Enter the following text to handle specific menu commands (adjust the menu ID accordingly:
if e_ID == 101 then
Dialog.Message("Notice", "You selected menu item 101");
end
8. Click OK to accept the script and then select Publish > Preview from the menu and try out the menu command the you handled.
You can use this method to handle all of your menu commands. Just add additional if..then..end blocks for the other commands. Also note that you do not have to handle menu commands on each page, you can handle them for the entire application using the "On Menu" event of the project actions (select Project > Actions) from the menu. For more details about using menus bars, search for "Menu Bar" in the help file.