Creating Custom Toolbars
Toolbars provide another method of quickly performing specific tasks. For example, you can launch frequently used procedures or create graphs and charts, all with the click of a toolbar button.
- From the menus choose:
The Show Toolbars dialog box lists all of the toolbars available for the currently selected window.
- If it isn't already selected, choose Data Editor from the Window list.
- Click New.
- In the Toolbar Properties dialog, type My Toolbar as the name of your new toolbar.
- This toolbar should appear only in the Data Editor window. So, deselect (clear) the boxes for the other window types.
- Click Edit to add buttons to your toolbar.
Toolbar items are separated into categories. Select a category to view its items.
Figure 1. Edit Toolbar dialog box - Select the Data category.
- Drag the Split File and Select Cases items to the toolbar.
- Select the Analyze category.
- Drag the Descriptive Statistics Frequencies and Descriptive Statistics
Crosstabs items to the toolbar. (Note: These items will only be available
if you have the Statistics Base option.)
You can create custom toolbar items to run a command syntax file, another application, or a script.
- Click New Tool to display the Create New Tool dialog box.
- Type Create Data in the Label field.
- Select Syntax as the action type.
- Click Browse and navigate to the Samples directory of the installation directory.
- Select CreateData.sps.
Custom toolbar items are displayed in the User-Defined category. Custom menu items created with the Menu Editor are also displayed in this category.
- Drag the Create Data item to the toolbar.
Figure 2. Select custom tool Note: Create Data may be displayed twice in the list if you also performed the task for creating custom menu items. In this example, both entries do exactly the same thing, so it doesn't matter which one you use. If you've already created a custom menu item for a specialized task, you don't need to redefine the task for inclusion in customized toolbars. Just select the item in the User-Defined list if you have already defined a custom menu item for the same task.
To assign a different image to the new tool (or to any item on the toolbar):
- Select the item on the displayed toolbar.
- Click Change Image, and then select the image file you want to use.
- For this example, navigate to the Samples directory of the installation directory and select RunButton.jpg.
- Click Open, and then click Continue in the Edit Toolbar dialog box and OK in the Show Toolbars dialog box.
Your new toolbar is now displayed in the Data Editor window. If you use the Create Data tool, it will run the CreateData.sps command syntax file, which generates a new dataset with 100 cases and 20 variables with normally distributed values.
