English

How To: Change the size and style of the font in the Table of Contents using Avenue

Summary

You can change the size and style of the font in the Table of Contents by using the following Avenue script.

Procedure

  • Change default setting
    You can modify the startup file that is stored in the $AVHOME\etc folder so ArcView will load the specified size and style of font each time ArcView is started.

    a) Copy the Avenue code.

    Code:
    s = TextSymbol.Make
    s.SetFont(Font.Make("Courier New","Bold"))
    s.SetSize(8.5)
    TOC.SetDefaultSymbol(s)

    b) Open the $AVHOME\etc\startup file in a text editor such as NotePad or WordPad.
    c) Paste the Avenue code at the end of the startup file.
    d) Save the startup file.
    e) Restart ArcView.

    Note:
    You can change the font name, style, and size by replacing the existing values in the Avenue script with the values that you would like to display in the Table of Contents.

  • Project specific
    You can load and run a script so ArcView will load the specified size and style of font for that project only.

    a) Copy the Avenue code.

    Code:
    s = TextSymbol.Make
    s.SetFont(Font.Make("Garamond","Italic"))
    s.SetSize(16)
    TOC.SetDefaultSymbol(s)

    b) Open a script window.
    c) Paste the Avenue code into the script window.
    d) Select Compile from the Script menu.
    e) Select Run from the Script menu.

    Note:
    You can change the font name, style, and size by replacing the existing values in the Avenue script with the values that you would like to display in the Table of Contents.