Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

General Front Panel Configuration

Front Panel's PANEL syntax allows you to:

General Steps

  1. Create a new Front Panel configuration file in /etc/dt/appconfig/types/language or HomeDirectory/.dt/types.

  2. Copy the default PANEL description from /usr/dt/appconfig/types/language/dtwm.fp to the new file.

  3. Edit the PANEL description.

    The new PANEL description has precedence over the default one.

To Change the Default Front Panel Location

    Use the PANEL_GEOMETRY field in the PANEL definition to specify the location.

For example, the following panel is in the upper right corner.

	PANEL SpecialFrontPanel
 	{
  	 PANEL_GEOMETRY      -1+1
  	  …
 	}

To Label Controls in the Main Panel

  1. Add the following line to the PANEL definition:

    	DISPLAY_CONTROL_LABELS   True
  2. Add a LABEL field to each control.

    The control_name is used if no LABEL is specified.

To Change the Click Behavior of Controls

    Use the CONTROL_BEHAVIOR field in the PANEL definition to specify how the user runs a control's PUSH_ACTION. Values for the field are:

    single_click—the user clicks the control to run the PUSH_ACTION

    double_click—the user double-clicks the control to run the PUSH_ACTION

To Create an Entirely New Front Panel

Creating a new Front Panel may be preferable when you want to make extensive changes.

To avoid conflict with the built-in Front Panel components, an entirely new Front Panel should use new names for the PANEL and other containers.

  1. Create the PANEL component for the new Front Panel. Give it a unique name:

    	PANEL front_panel_name
     	{
     	   …
     	}
  2. Create the new boxes and controls, using the new container names.

    If you want to use existing components, you must copy their definitions and change the CONTAINER_NAME value.

  3. Choose Restart Workspace Manager from the Workspace menu.

Example of Creating a Personal Front Panel with Three Rows

The following example changes the default Front Panel so that its controls are organized into three rows.

  1. Copy /usr/dt/appconfig/types/language/dtwm.fp to HomeDirectory/.dt/types/MyFrontPanel.fp. Give the file write permission.

    This is the file you will edit to provide the new Front Panel.

  2. Change the name of the Front Panel:

    	PANEL NewFrontPanel
  3. Change the name of the box named Top and edit its container name:

    	BOX NewFrontPanelTop
     	{
     	  CONTAINER_NAME					NewFrontPanel
     	  POSITION_HINTS					first
     	  … 	
    	}
  4. Add box definitions for the middle and bottom rows:

    	BOX NewFrontPanelMiddle
     	{
     	  CONTAINER_NAME						NewFrontPanel
      	 POSITION_HINTS						second
     	}
     
    	BOX NewFrontPanelBottom
     	{
     	  CONTAINER_NAME						NewFrontPanel
     	  POSITION_HINTS						second
     	}
  5. Change the CONTAINER_NAME of the following controls to NewFrontPanelTop:

    • Clock

    • Date

    • Home

    • TextEditor

    • Mail

  6. Change the CONTAINER_NAME of the following controls to NewFrontPanelBottom:

    • Printer

    • Style

    • Applications

    • Help

    • Trash

  7. Change the CONTAINER_NAME of the switch to NewFrontPanelMiddle.

  8. Choose Restart Workspace Manager from the Workspace menu.