Customizing the SAS Windowing Environment |
Creating or Customizing an Application- or Window-Specific Toolbox
Creating or Customizing an Application- or Window-Specific Toolset
Techniques for Customizing Toolboxes and Toolsets |
You can customize toolboxes in the following ways:
Through the Preferences dialog box. The Preferences dialog box enables you to customize the appearance and behavior of toolboxes. For information about using the Preferences dialog box, see Modifying X Resource Settings by Using the Preferences Dialog Box and X Resources That Control Toolbox Behavior.
By specifying X resources in your resource file. For more information about X resources that affect toolboxes, see X Resources That Control Toolbox Behavior.
Through the Tool Editor dialog box. The Tool Editor enables you to customize the individual tools in a toolbox. For more information, see Using the Tool Editor.
The Tool Editor also enables you to create custom toolsets for your SAS applications. A toolset is a set of predefined tools that is associated with an application. Toolsets make it easier for individual users to customize their application toolboxes. If you create a toolset for an application, users can simply choose the tools they want to appear in their toolboxes and do not have to define the icons, commands, tip text, and IDs for those tools.
For example, you can define a default toolbox for your application that includes tools for opening files, cutting, copying and pasting text, and saving files. You can define a toolset that includes those tools and tools for opening the Preferences dialog box, opening the Replace dialog box, and entering the RECALL command. These additional tools will not appear in the users' toolbox unless a user adds them to their toolbox with the Tool Editor.
You can view the TOOLSET contents by opening the Tool Editor dialog box and clicking on Actions, provided that the TOOLSET name has the same name as the toolbox you are editing. For more information, see Changing an Existing Tool and Creating or Customizing an Application- or Window-Specific Toolset.
X Resources That Control Toolbox Behavior |
You can control the behavior of toolboxes with the following resources:
specifies whether SAS automatically fills in the remaining letters of a command that begins with the same letter as a command that you have entered previously as you type it in the command window. The default value is True.
specifies whether SAS saves the commands that you enter in the command window and how many commands are saved. You can specify a number from 0 to 50. If you specify 0, no commands will be saved. If you specify 1 or more, that number of commands is saved in the file commands.hist in your Sasuser directory. If you specify 1 or more for this resource and SAS.autoComplete is True, then SAS will be able to automatically fill in commands that were entered in previous sessions. The default value is 25.
controls opening the default toolbox when SAS is invoked. The default is True.
controls whether the toolbox stays open when you close the Program Editor window. The default value is True, which means that the toolbox remains open whenever you close the Program Editor window.
controls whether the toolbox is always on top of the window stack. The default value is True, which might cause problems with window managers that are not Motif window managers or other applications that want to be on top of the window stack. If you have such a situation, set this resource to False.
sets the delay in milliseconds before displaying the ToolTip text. The default is 750.
controls whether the command window and toolbox are joined or separated. The SAS.defaultToolBox and SAS.defaultCommandWindow resources control whether the toolbox and command window are displayed. If both are displayed, this resource controls whether they are joined or separated. The default is True.
controls whether tool icons in the toolbox are displayed as 48x48 pixels or 24x24 pixels. The default is False (24x24 pixels).
controls whether the combined command and toolbox window has arrows at the left and right. You can use these arrows to hide or show portions of the window as they are needed. The default is False.
determines whether ToolTip text is displayed. Some window managers, such as tvtwm , might place the ToolTip text behind the toolbox. If this happens in your environment, set this resource to False. The default is True.
Using the Tool Editor |
The Tool Editor dialog box enables you to modify the contents and appearance of your toolboxes, as shown in the following display. To invoke the Tool Editor dialog box, do one of the following:
Issue the TOOLEDIT command in the command window. For more information, see TOOLEDIT Command: OpenVMS.
By default, the Tool Editor dialog box edits the current toolbox. To edit a different toolbox, invoke the Tool Editor dialog box and click Open. Then, specify the libref, catalog, and entry name for the toolbox that you want to edit. Click OK.
After you invoke the Tool Editor dialog box, the toolbox goes into "preview mode." In preview mode, clicking a tool icon makes that icon the current icon and displays its associated commands in the Command field. The current icon always appears selected.
The items in the ToolBox area of the Tool Editor dialog box affect the entire toolbox:
displays the catalog entry that you are editing. The default toolbox for the SAS windowing environment is named SASUSER.PROFILE.DMS.TOOLBOX.
specifies how the icons in the toolbox are arranged. The default size creates a horizontal toolbox. One tool per row creates a vertical toolbox.
When you open the Tool Editor dialog box, the first icon in the toolbox is the current icon (the icon appears selected), and its information appears in the Button area of the dialog box. To change an existing tool, you can select a tool from the toolset displayed by clicking Actions or you can modify the fields individually.
Note: Clicking Actions displays a toolset only if a toolset is associated with (has the same entry name as) the toolbox that you are editing. For more information, see Saving Changes to the Toolbox or Toolset.
To use Actions, select the tool that you want to change, and then select Actions. The Tool Editor displays the toolset associated with the toolbox. If you select a tool from this toolset, the Tool Editor enters the appropriate information into the button fields for you.
To modify the fields individually, perform the following steps:
Click and change the Button area fields as appropriate:
specifies the SAS windowing environment command or commands that you want executed when you select the icon. You can use any SAS command that is available under OpenVMS. For information about commands, see Commands under OpenVMS and the SAS commands section in the Base SAS section in the online SAS Help and Documentation. For example, you could create an icon to open the Change Directory dialog box by using the DLGCDIR command, which is described in DLGCDIR Command: OpenVMS.
is used for applications that are designed to be run under Microsoft Windows. The help text is displayed in the SAS windowing environment status bar on Windows when a toolbox is ported to and loaded on those operating environments.
specifies the text that is displayed when you position the cursor over the icon.
is useful if you are creating toolboxes for SAS/AF applications. The ID is the identifier of the corresponding menu item in the application. This number is the value assigned to the item in the ID option of the ITEM statement in PROC PMENU. If you specify an ID, then the application can set the state of the PMENU item to match the state of the tool in the toolbox, and it can make the PMENU item active or inactive to match whether the PMENU item is active or inactive. If you do not specify an ID, the ID defaults to 0.
Click Icon or double-click an icon in the preview toolbox. The Select a Pixmap dialog box opens, which displays the icons provided with SAS. These icons are divided into several categories such as SAS windows; data; analysis; numbers and symbols; files, folders, and reports; and so on. To change categories, click the arrow to the right of the Icon Category field and select a new category.
Save your changes as described in Saving Changes to the Toolbox or Toolset.
To add an icon to the toolbox, perform the following steps:
Select the icon that is adjacent to where you want to add the new tool icon.
Click Add before or Add after, whichever is appropriate. The Tool Editor adds a new icon (labeled SAS) to the toolbox and clears the Button area fields.
Enter the appropriate information in the Button area fields. These fields are described in Changing an Existing Tool.
Change the icon, as described in Changing an Existing Tool.
Save your changes as described in Saving Changes to the Toolbox or Toolset.
To change the position of a tool in the toolbox, select the icon, and then click the left or right arrows in the Button area to move the icon.
To delete a tool icon from the toolbox:
Save your changes as described in Saving Changes to the Toolbox or Toolset.
To return all tools in the current toolbox to their default settings, click Defaults at the bottom of the Tool Editor dialog box. When you make this selection, any customizations that you have made are lost. It also deletes any icons that you have added to the toolbox. The Tool Editor dialog box asks you to verify your request. Click Yes to restore the default settings, No to keep your customizations, or Cancel to do neither.
You can save the changes to the catalog entry that is displayed in the Name field of the Tool Editor dialog box, or you can create a new toolbox with a different name.
Note: If you are customizing a window-specific or application-specific toolbox for your personal use, save the customized toolbox in your SASUSER.PROFILE catalog by using the same entry name as the PMENU entry for the window or application. SAS searches for toolboxes first in the SASUSER.PROFILE catalog and then in the application catalog.
Click Save or Save as to perform the following tasks:
saves the toolbox information to the catalog entry shown in the Name field.
causes the Tool Editor dialog box to prompt you to enter a different libref, catalog, and entry name. The entry type for a toolbox is always TOOLBOX.
You can also choose to save the toolbox as a toolset. If you save the toolbox as a toolset, the entry type will be TOOLSET; otherwise, the entry type is always TOOLBOX. Saving a set of tools as a TOOLSET does not change your TOOLBOX entry. For more information about toolsets, see Techniques for Customizing Toolboxes and Toolsets and Creating or Customizing an Application- or Window-Specific Toolset.
If you click Close or Open without first saving your changes, the Tool Editor dialog box prompts you to save the changes to the current toolbox before continuing. Click Yes to save your changes; click No to ignore any changes you made; or click Cancel to do neither.
After you save the toolbox or toolset, the Tool Editor remains open for additional editing, and the Name field changes to the name of the new entry (if you entered a new name).
Note: To SAS/AF application developers or site administrators: If you are editing a window-specific or application-specific toolbox that you want to be accessible to all users, you must save the TOOLBOX entry with the same library, catalog, and entry name as the PMENU entry for the window or application. You need WRITE access to the appropriate location. For example, to store a customized toolbox for the graphics editor, the site administrator would store the toolbox in SASHELP.GI.GEDIT.TOOLBOX.
Creating a New Toolbox |
To create a new toolbox, complete the following steps:
Edit an existing toolbox by invoking the Tool Editor dialog box (select Tools Options Edit Toolbox in the active window) and making your changes. Then, save the edited toolbox as described in Saving Changes to the Toolbox or Toolset.
Copy an existing TOOLBOX entry. You can copy a toolbox by opening the CATALOG window, specifying the appropriate catalog, and then entering the COPYITEM command. For example, to copy the default toolbox, enter the following commands in the command window:
catalog sasuser.profile copyitem sasuser.profile.dms.toolbox sasuser.profile.newtools.toolbox
Edit the new toolbox by using the Tool Editor dialog box (select Tools Options Edit Toolbox in the active window).
Specify the libref, catalog, and entry name of the new toolbox.
How to Load a Different Toolbox |
To load a toolbox, issue the TOOLLOAD command in the command window:
TOOLLOAD <libref.catalog.entry>
Creating or Customizing an Application- or Window-Specific Toolbox |
If you are an application developer and want to create or edit an application toolbox, follow these steps:
Delete any existing TOOLBOX entry in your SASUSER.PROFILE catalog for the window or application that you want to customize. When you delete the copy of the toolbox in your SASUSER.PROFILE catalog, you automatically receive a copy of the toolbox that is supplied with SAS when you invoke the Tool Editor dialog box.
Create or edit the application toolbox as described in Creating a New Toolbox or Using the Tool Editor.
Save the edited toolbox as described in Saving Changes to the Toolbox or Toolset.
Inform your users that you have changed the window or application toolbox. If they want to use the new toolbox, they must delete the corresponding TOOLBOX entry from their SASUSER.PROFILE catalog. The new toolbox will then be automatically loaded when the window or application is invoked. If users do not delete the corresponding TOOLBOX entry from their SASUSER.PROFILE catalog, that copy of the toolbox will be loaded instead of the new toolbox.
Creating or Customizing an Application- or Window-Specific Toolset |
You define application- or window-specific toolsets in the same way that you create an application- or window-specific toolbox. There are only two differences:
To create a new toolset, start by defining a toolbox as described in Creating a New Toolbox.
After you have defined the toolbox, save it as a TOOLSET entry, not as a TOOLBOX entry.
Note: If you are an application developer, make sure that you delete an existing TOOLSET entry for your application as described in Creating or Customizing an Application- or Window-Specific Toolbox before you modify your application's toolset.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.