Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Advanced Front Panel Customization Defining Front Panel Controls To Create a New Control To Animate a Control  Previous   Contents   Next 
   
 

Providing On Item Help for Front Panel Controls

There are two ways to provide help for a control:

  • Providing a help string in the control definition.

    The help string is displayed in the help viewer when the user invokes on-item help for the control. The help string cannot include formatting (such as headings) or links.

    To provide a help string, specify it in the control definition:

    	HELP_STRING   			 help_string
  • Specifying a help topic in a registered help volume.

    A help topic is information authored using the full capabilities of the help system. Authoring a help topic requires you to use the desktop Help Developer's Kit.

    To provide a help topic, specify the help volume and topic ID in the control definition:

    	HELP_VOLUME				help_volume_name
     	HELP_TOPIC				topic_id

Customizing the Workspace Switch

There are several ways to customize the workspace switch:

  • Changing the number of workspaces

  • Changing the layout of the switch

  • Changing the controls in the switch

To Change the Default Number of Workspaces

  • Modify the following Workspace Manager resource:

	Dtwm*workspaceCount:						n

For more information, see "To Change the Number of Workspaces on a System-Wide Basis".

To Change the Number of Switch Rows

  • Modify the NUMBER_OF_ROWS field in the SWITCH definition.

For example, the following definition defines a three-row switch.

SWITCH Switch
 {
 	CONTAINER_NAME				box_name
 	NUMBER_OF_ROWS				3
   ...
 }

To Change or Add Controls in the Workspace Switch

  1. Create a Front Panel configuration file with the control definition.

    • Specify that the control be inside the switch:

      		CONTAINER_NAME   Switch
       		CONTAINER_TYPE   SWITCH
    • Specify the position in the switch:

      		POSITION_HINTS    n

      where n is an integer. The positions are numbered sequentially left-to-right, top-to-bottom. (For the default two-row switch, the positions are 1 through 4.)

  2. Create the icon for the control. The recommended size is 16 by 16 pixels.

    For example, the following control puts a Terminal control in the switch.

    		CONTROL SwitchTerminal  
    {    
    	TYPE                  icon    
    	CONTAINER_NAME        Switch    
    	CONTAINER_TYPE        SWITCH    
    	POSITION_HINTS        3    
    	ICON                  Fpterm    
    	LABEL                 Terminal    
    	PUSH_ACTION           Dtterm    
    	HELP_TOPIC            FPOnItemTerm    
    	HELP_VOLUME           FPanel  
    }

    The control uses a built-in icon and the same help topic used by the Terminal control in the Personal Applications subpanel.

General Front Panel Configuration

Front Panel's PANEL syntax allows you to:

  • Change the location of the Front Panel

  • Change the window decoration

  • Set general appearance and behavior of controls

    The default PANEL description is in /usr/dt/appconfig/types/language/dtwm.fp.

    For additional information, see the dtfpfile(4X) man page.

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.

 
 
 
  Previous   Contents   Next