Changing the Background Color of an Individual Tab

How to:

To change the background color of an individual tab on an active dashboard, you add the code BACKCOLOR='value' to the dashboard procedure. You can specify either the RGB (red, green, blue) color values for the tab, or you can specify the name of the color.

The specified color is applied to the background of the tab on the active dashboard when the dashboard is run.

The default background color of a tab is white.

To enable this feature, you must set the Output format property to active report when you create the active dashboard in Document Composer.

Important: If you add BACKCOLOR='value' syntax to an active dashboard procedure, and then open the procedure in Document Composer, the BACKCOLOR='value' syntax is removed from the procedure. For more information, see How to Change the Background Color of an Individual Tab.


Top of page

x
Procedure: How to Change the Background Color of an Individual Tab

This procedure describes how to change the background color of two tabs on an active dashboard. You can change the background color of multiple tabs using the same steps.

  1. Create an active dashboard in Document Composer.
  2. For the Compound document, set the Output format property to active report, as shown in the following image.

  3. Save the active dashboard and close Document Composer.
  4. In Developer Studio Explorer, right-click the name of the active dashboard procedure, and select Edit in Text Editor.
  5. Locate the code for PAGELAYOUT, which is under SECTION in the COMPOUND syntax. In the following sample code, the syntax elements COMPOUND, SECTION, PAGELAYOUT=1, PAGELAYOUT=2, and PAGELAYOUT=3 are shown in bold.
    COMPOUND LAYOUT PCHOLD FORMAT AHTML
    .
    .
    .
    SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5', MERGE=AUTO,
    ORIENTATION=LANDSCAPE, PAGESIZE=Legal, $ 
    PAGELAYOUT=1, NAME='Revenue Report', text='Revenue Report',
    TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5,
    METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5, LEFTMARGIN=0,
    RIGHTMARGIN=0,', $ 
    COMPONENT='T1R1',
    .
    .
    . 
    PAGELAYOUT=2, NAME='Regional Report', text='Regional Report',
    TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5,
    METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,
    LEFTMARGIN=0,RIGHTMARGIN=0,', $ 
    COMPONENT='T2R6',
    .
    .
    . 
    PAGELAYOUT=3, NAME='Product Report', text='Product Report',
    TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5,
    METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,
    LEFTMARGIN=0,RIGHTMARGIN=0,', $ 
    COMPONENT='T3R10',
    .
    .
    .
    END

    Each tab on an active dashboard is defined in the code for PAGELAYOUT=1, PAGELAYOUT=2, PAGELAYOUT=3, and so forth.

    For example, in the preceding sample code, the Revenue Report tab of the active dashboard is defined in PAGELAYOUT=1, the Regional Report tab is defined in PAGELAYOUT=2, and the Product Report tab is defined in PAGELAYOUT=3.

  6. To change the color of a tab, find the PAGELAYOUT code for the tab. After the syntax element text='text', type the RGB values for the desired background color, or type the name of the color. For example, you can change the background color of the sample Revenue Report tab from white (the default) to a light shade of yellow, using RGB color values. Type the following code after text='Revenue Report' in PAGELAYOUT=1:
    BACKCOLOR='RGB(255 255 187)',

    The new line of sample code looks like this:

    PAGELAYOUT=1, NAME='Revenue Report', text='Revenue Report', 
    BACKCOLOR='RGB(255 255 187)', TOC-LEVEL=1,
    .
    .
    .
  7. Save the active dashboard procedure and run it.
  8. Select the tab with the background color that you changed. WebFOCUS displays the selected tab on the active dashboard using the new color.

    On the sample active dashboard in the following image, the Revenue Report tab is selected. The background of the dashboard is displayed in a light shade of yellow, as specified in the active dashboard procedure.

    Active Dashboard with light yellow tab

  9. In the Procedure Viewer, find the code for PAGELAYOUT=2, which defines the second tab. After the syntax element text='text', type the value for the desired background color.

    For example, to change the background color of the sample Regional Report tab to yellow, type the following code after text='Regional Report':

    BACKCOLOR='YELLOW',

    The new line of sample code looks like this:

    PAGELAYOUT=2, NAME='Regional Report', text='Regional Report', 
    BACKCOLOR='YELLOW', TOC-LEVEL=1,
    .
    .
    .
  10. Save the active dashboard procedure and run it.
  11. Select the second tab with the background color that you changed to see the new color.

    On the sample active dashboard in the following image, the Regional Report tab is selected. The background is displayed in the color specified in the active dashboard procedure.

    Active Dashboard with yellow tab

  12. Close the Procedure Viewer.

    Keep in mind, if you open the active dashboard in Document Composer, the BACKCOLOR='value' syntax is removed from the procedure.


WebFOCUS