• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Extending the Interface with Scripts > Creating a Main Menu Layout

Creating a Main Menu Layout

If you have a really large or complex database with several files and dozens of layouts, the simple task of navigating from one place to the next can become difficult. A button bar can help, but once your database gets really cumbersome, all the buttons you need will take up too much space on a layout—space you need for real work. When this happens, you can create a Main Menu layout that contains only buttons. The buttons will take you to the most important layouts (like Data Entry) or execute scripts that search or print reports. Each of the other layouts in the database need contain only one button that returns you to the Main Menu.

To create a Main Menu layout:

1.
Choose View > Layout Mode (Ctrl+L/Command-L).

2.
Choose Layouts > New Layout (Ctrl+N/Command-N).

3.
In the New Layout dialog box, type a name for the layout. (We use Main Menu.) Choose Blank layout as the layout type (Figure 9.23). Click Finish.

Figure 9.23. Since the Main Menu will only contain buttons, begin with a blank layout.


4.
Drag the Header and Footer parts up until they disappear, since we only need the Body part, then drag the Body tab down to make room for the buttons you're going to add.

5.
Follow the steps in “To create a button for a script” on page 184 to add a button to the layout.

6.
Select the new button. Holding down the Ctrl/Option key, drag to duplicate the button, changing the labels and scripts for each one (Figure 9.24). Repeat this step as many times as you need to create the total number of buttons for the layouts and scripts you use frequently.

Figure 9.24. Ctrl/Option dragging allows you to create one button and then duplicate it, retaining its size and formatting.


7.
Arrange the buttons on the page and add labels and headings. It's a good idea to group functions logically so you won't waste time later reading every button to find the one you want (Figure 9.25).

Figure 9.25. Group buttons logically to make it easy to use them later.


You now have a layout with buttons that link you around your database. All that's left is to create a script you can use to link your other layouts back to the Main Menu.

8.
Choose Scripts > ScriptMaker. In the Define Scripts dialog box, type a name for the script. (We use Go to Main Menu.) Click Create.

9.
When the Script Definition dialog box appears, delete the default script in the assembly window by clicking Clear All.

10.
From the step list on the left, double-click Go to Layout.

11.
In Options, choose Main Menu from the Specify drop-down list (Figure 9.26). Click OK, then Done.

Figure 9.26. Choose the layout you want to go to when you click the button.


12.
On layouts in the same database file as the Main Menu, follow the steps in “To create a button for a script” on page 184 to add a button to the layout.

13.
In the Specify Button dialog box, select Go to Layout from the list on the left and Main Menu from the Specify drop-down list in Options (Figure 9.27). Label the button Main Menu.

Figure 9.27. Scripts in other layouts will run the Go to Main Menu script.


14.
Repeat this step for as many layouts as you need to be linked to the Main Menu.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint