Defining Preferences for Display in the Preferences Dialog Box

For preferences to display in the Preferences dialog box, you must define preference information (i.e., Tag, Name, Description) and the groups to which the preference is associated.

Preference Information

If you create custom preferences, you must define the preferences in a formatted-text .pref file. Defining custom preferences in a .pref file defines the display of preferences in the Preferences dialog box.

Note: It is recommend that you do not edit the default .pref files. However, if you choose to edit the .pref files, be aware that Technical Support, the documentation, and the software itself refers to preferences as originally defined in the default .pref files.

Procedure 3: Defining Preferences to Appear in the Preferences Dialog Box

  1. Using a text editor, specify your preferences.

    Preference groups and associated preferences are defined using the following format.

        start_preference
            Tag: <tag>
            Name: <name>
            Description: <description>
        end_preference
    

    For example, the following set of XML attributes defines a standard preference:

        start_preference
            Tag: edit_pad.text_color
            Name: Text Color
            Description: Specifies text color for the built-in text editor.
        end_preference
    

    Note: Do not enter a hard return within a Description attribute. Instead, let the text wrap to the next line.

  2. Save the preference information in a file with the extension .pref in any directory specified by the mod_dirs preference.

    If you want the preference to appear for all Modeler users, save the file with the extension .pref in the directory <reldir>\sys\configs.

After defining custom preferences, you can associate the preferences with groups.

Preference Groups

For your convenience, preferences are categorized into groups, making preferences easier to find and set. Modeler includes the following default preference groups.

You should not modify the default preference groups. However, you can add your own preference groups and assign preferences to them. Adding your own preferences groups is helpful if there are certain preferences that you commonly set.

Note: It is recommend that you do not edit the default .pref files that are installed with Modeler. However, if you choose to edit the .pref files, be aware that Technical Support, the documentation, and the software itself refers to preferences as originally defined in the default .pref files.

Procedure 4: Defining Preference Groups

  1. Using a text editor, specify your preference groups and the preferences associated with each group.

    Preference groups and associated preferences are defined using the following format.

        start_group
            Hierarchical Name: <category_name>
            Preferences: <preference_tag>, <preference_tag>, …
        end_group
    

    Note: A preference tag can be specified in multiple groups. Additionally, the Preferences attribute can includes one or more preference tags. However, do not enter a hard return within a preference attribute.

  2. Save the preference group information in a file with the extension .pref in any directory specified by the mod_dirs preference.

    If you want the preference groups to appear for all Modeler users, save the file with the extension .pref in the directory <reldir>\sys\configs.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com