Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Customizing Toolboxes and Toolsets

You can customize toolboxes

The Tool Editor also allows 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 press the [Actions] button 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, opening the Replace dialog, 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. See Changing an Existing Tool and Creating or Customizing an Application- or Window-Specific Toolset for more information.


Specifying Toolbox Resources

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 : close up | n
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.

SAS.defaultToolBox: True | False
controls opening the default toolbox when the SAS System 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 may 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/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 if toolbox tip text is displayed. Some window managers may place the toolbox tip behind the toolbox. If this happens in your environment, set this resource to False. The default is True.


Using the Tool Editor

You can change the appearance and contents of a toolbox using the Tool Editor. To invoke the Tool Editor, (shown in Tool Editor Dialog Box) select

Tools
[arrow]
Options
[arrow]
Edit Toolbox...
Alternatively, you can issue the TOOLEDIT command as described in TOOLEDIT or open the window menu for the command window/toolbox and select Edit toolbox....

Tool Editor Dialog Box

[IMAGE]

By default, the Tool Editor edits the current toolbox. To edit a different toolbox, select [Open...] and specify the libref, catalog, and entry name for the toolbox you want to edit.

Once you invoke the Tool Editor, the toolbox goes into preview mode. In preview mode, clicking on a tool icon makes that icon the current icon and displays its associated commands in the Command field. The current icon always appears pressed.

Changing the Appearance of the Entire Toolbox

The items in the area of the Tool Editor labeled "ToolBox" 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 an Existing Tool

When you open the Tool Editor, the first icon is the current icon, and information about the current icon appears in the Button area of the dialog box. To change an existing tool, you can select a tool from the toolset displayed by the [Actions] button or you can modify the fields individually.

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

To use [Actions], select the tool that you want to change, and then select [Actions]. The Tool Editor displays the toolset associated with 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:

  1. Select the icon you want to change.

  2. Click in and change the Button fields as appropriate.
    Command:
    specifies the command or commands that you want executed when you click on the icon. You can use any windowing environment command available under UNIX. For information on portable commands, see SAS Language Reference: Dictionary. Separate commands with a semi-colon (;). 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 or OS/2. The help text is displayed in the AWS status line on Windows and OS/2 when a toolbox is ported to and loaded on those platforms.

    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 pull-down 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.

  3. Change the icon if necessary.
    1. Select [Icon...] or double-click on an icon in the preview toolbox. The Tool Editor opens the Select A Pixmap dialog box, which displays the icons provided with the SAS System. 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].

  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:

  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 an Existing Tool.

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

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


Changing 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:

  1. Select the tool you want to delete.

  2. Select [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, select [Defaults...]. The Tool Editor asks you to verify your request. Select [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 personal 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. The SAS System searches for toolboxes and toolsets first in SASUSER.PROFILE, 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 to 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.

[Save] saves the toolbox information to the catalog entry shown in the Name field. [Save As...] prompts you to enter a different libref, 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 and Creating or Customizing an Application- or Window-Specific Toolset for information about toolsets.)

If you select [Close] or [Open...] without first saving your changes, the Tool Editor prompts 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, you can:


Creating or Customizing an Application- or Window-Specific Toolbox

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

  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 allows you to pick up a copy of the toolbox supplied with the SAS System 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 they 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 EXECMDI 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 EXECMDI routine.


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:

Note:   If you are an application developer, make sure that you delete any 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.   [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.