Previous Page | Next Page

Customizing the SAS Windowing Environment

Customizing Toolboxes and Toolsets in UNIX Environments


Techniques for Customizing Toolboxes

You can customize toolboxes in the following ways:


X Resources That Control Toolbox Behavior

You can control the behavior of toolboxes with the following SAS resources:

SAS.autoComplete: True | False

specifies whether SAS automatically fills in the remaining letters of a command as you type a command in the command window that begins with the same letter as a command that you have entered previously. The default value is True.

SAS.commandsSaved: number-of-commands-saved

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 can automatically fill in commands that were entered in previous sessions. The default value is 25.

SAS.defaultToolBox: True | False

controls opening the default toolbox when SAS is invoked. The default is True.

SAS.isToolBoxPersistent: True | False

controls whether the toolbox that is associated with the Program Editor stays open when you close the Program Editor. The default value is True.

SAS.toolBoxAlwaysOnTop: True | False

controls whether the toolbox is always on top of the window stack. The default value of True might cause problems with window managers that are not Motif interface 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.

SAS.toolBoxTipDelay: delay-in-milliseconds

sets the delay in milliseconds before displaying the toolbox tip. The default is 750.

SAS.useCommandToolBoxCombo: True | False

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 value is True.

SAS.useLargeToolBox: True | False

controls whether tool icons in the toolbox are displayed as 24x24 pixels or 48x48 pixels. The default is False (24x24 pixels).

SAS.useShowHideDecorations: True | False

controls whether the combined command window 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 value is False.

SAS.useToolBoxTips: True | False

determines whether toolbox tip text is displayed. Some window managers might place the toolbox tip behind the toolbox. If the toolbox tip is placed behind the toolbox in your environment, set this resource to False. The default is True.


Using the Tool Editor


What Is a Toolset?

The Tool Editor 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 select Actions in the Tool Editor and choose the tools that they want to appear in their toolboxes. Users 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 users toolboxes unless users add them to their toolboxes with the Tool Editor. See Changing the Attributes of an Existing Tool and Create or Customize an Application- or Window-Specific Toolset for more information.


Invoking the Tool Editor

You can change the appearance and contents of a toolbox using the Tool Editor. To invoke the Tool Editor, select Tools [arrow] Options [arrow] Edit Toolbox. Alternatively, you can issue the TOOLEDIT command as described in TOOLEDIT Command: UNIX.

The following display shows an example of a Tool Editor dialog box that was opened from the Tools menu in the Program Editor window:

Tool Editor Dialog Box

[Tool Editor Dialog Box]

By default, the Tool Editor enables you to edit the current toolbox. To edit a different toolbox, click the Open button in the Tool Editor dialog box. Specify a library, catalog, and entry name for the toolbox you want to edit. The following display shows the Open dialog box:

The Open Dialog Box

[The Open Dialog Box]


After You Invoke the Tool Editor

After you invoke the Tool Editor, the toolbox displays in preview mode. In preview mode, clicking a tool icon to select a tool makes that icon the current icon. Its associated commands are displayed in the Command field. Attributes in the Help Text, Tip Text, and Id fields might also display, depending on whether this information was added when the tool was created or updated. For more information about the fields and buttons in the Tool Editor dialog box, click the Help button.


Changing the Appearance of the Entire Toolbox

The items in the ToolBox area of the Tool Editor affect the entire toolbox:

Name

displays the catalog entry that you are editing. The default toolbox is named SASUSER.PROFILE.DMS.TOOLBOX.

Max tools per row

specifies how the icons in the toolbox are arranged. The default value creates a horizontal toolbox. One tool per row creates a vertical toolbox.


Changing the Attributes of an Existing Tool

When you open the Tool Editor, the first tool in the toolset is selected, and the attributes for this tool appear in the Button area of the Tool Editor dialog box. If you click another icon in the toolset, the Tool Editor displays the attributes of that tool.

Alternatively, you can select a tool from the toolset that is displayed when you click the Actions button. When you click OK after you select a tool, the attributes in the Button area of the Tool Editor are updated to correspond to the new tool.

Note:   Clicking the Actions button displays a toolset only if a toolset is associated with (meaning, has the same entry name as) the toolbox that you are editing. See Saving Changes to the Toolbox or Toolset for more information.  [cautionend]

When you have selected the tool you want to change, you can then select an attribute field in the Tool Editor and type the changes you want to make.

To modify the attributes of a tool, follow these steps:

  1. From the toolset, select the tool that you want to change.

  2. In the Button area, select an attribute field associated with a button and change the text as appropriate:

    Command

    specifies the command or commands that you want executed when you click the icon. You can use any windowing environment command that is available under UNIX. For information about commands that are valid in all operating environments, see SAS Help and Documentation. Separate commands with a semicolon (;). For example, you could create an icon to open the Change Working Directory dialog box by using the DLGCDIR command.

    Help Text

    is used for applications that are designed to be run under Windows. The help text is displayed in the AWS status bar on Windows when a toolbox is ported to and loaded on those windows.

    Tip Text

    specifies the text that is displayed when you position the cursor over the icon.

    Id

    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. It can make the PMENU item active or inactive to match whether the tool in the toolbox is active or inactive. If you do not specify an ID, the ID defaults to 0.

  3. Change the icon if necessary.

    1. Click the Icon button or double-click an icon in the preview toolbox. The Tool Editor opens the Select a pixmap dialog box, which displays the icons that are 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, select the arrow to the right of the Icon Category field and select a new category.

    2. Select the icon you want to use, and then select OK.

      The following display shows the Select a pixmap dialog box:

      [untitled graphic]

  4. Save your changes as described in Saving Changes to the Toolbox or Toolset.


Adding Tools to the Toolbox

To add a tool to the toolbox, follow these steps:

  1. Select the icon next to where you want to add the new tool.

  2. Select Add before or Add after. The Tool Editor adds a new icon to the toolbox and clears the Button fields.

  3. Enter the appropriate information in the Button fields as described in Changing the Attributes of an Existing Tool.

  4. Change the attributes of the icon, if necessary, as described in Changing the Attributes of an Existing Tool.

  5. Save your changes as described in Saving Changes to the Toolbox or Toolset.


Change the Order of the Tools in the Toolbox

To change the position of a tool in the toolbox, select the tool icon, and then click on the left or right arrows to move the tool.


Deleting Tools from the Toolbox

To delete a tool from the toolbox, follow these steps:

  1. Select the tool you want to delete.

  2. Click Delete.

  3. Save your changes as described in Saving Changes to the Toolbox or Toolset.


Returning to the Default Settings

To return all tools in the current Toolbox to their default settings, click Defaults. The Tool Editor asks you to verify your request. Click Yes, No, or Cancel.


Saving Changes to the Toolbox or Toolset

You can save the changes to the catalog entry shown in the Name field or create a new toolbox with a different name.

If you are customizing a window- or application-specific toolbox or toolset for your own use, you should save the customized toolbox or toolset in your Sasuser.Profile catalog using the same entry name as the PMENU entry for the window or application. SAS searches for toolboxes and toolsets first in the Sasuser.Profile catalog, and then in the application catalog.

If you are a SAS/AF application developer or site administrator and you are editing a window- 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. To associate a toolset with a specific toolbox, save the TOOLSET entry with the same library, catalog, and entry name as the TOOLBOX entry. You will need write permissions to the appropriate location. For example, to store a customized toolbox for the graphics editor, the site administrator needs to store the toolbox in SASHELP.GI.GEDIT.TOOLBOX.

Clicking the Save button saves the toolbox information to the catalog entry shown in the Name field. Clicking the Save As button prompts you to enter a different library, catalog, and entry name. 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. See Customizing Toolboxes and Toolsets in UNIX Environments and Create or Customize an Application- or Window-Specific Toolset for information about toolsets.)

If you click the Close or the Open button without first saving your changes, the Tool Editor prompts you to save the changes to the current toolbox or toolset before continuing.

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).


Creating a New Toolbox

To create an entirely new toolbox, follow these steps:


Create or Customize an Application- or Window-Specific Toolbox

If you are an application developer and want to create or edit an existing application toolbox, follow these steps:

  1. Delete any existing TOOLBOX entry in your Sasuser.Profile for the window or application that you want to customize.

    Deleting the copy of the toolbox in your Sasuser.Profile enables you to pick up a copy of the toolbox that is supplied with SAS when you invoke the Tool Editor.

  2. Create or edit the application toolbox as described in Creating a New Toolbox or Using the Tool Editor.

  3. Save the edited toolbox as described in Saving Changes to the Toolbox or Toolset.

  4. Inform your users that you have changed the window or application toolbox.

    If users want to use the new toolbox, they must delete the corresponding TOOLBOX entry from their Sasuser.Profile. The new toolbox will then be automatically loaded when the window or application is invoked. If a user does not delete the corresponding TOOLBOX entry from their Sasuser.Profile, that copy of the toolbox will be loaded instead of the new toolbox.

The TOOLLOAD and TOOLCLOSE commands are most useful when you are developing SAS/AF applications. You can use the EXECCMDI routine with these commands to enable your application to open and close the toolbox and to give users of your applications access to several toolboxes during the course of their work. See SAS Component Language: Reference for a description of the EXECCMDI routine.


Create or Customize 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:

Note:   If you are an application developer, make sure that you delete any existing TOOLSET entry for your application as described in Create or Customize an Application- or Window-Specific Toolbox before you modify your application's toolset.   [cautionend]

Previous Page | Next Page | Top of Page