Setting Part Style Properties

Part styles for a window class are a set of bitflag values. Each style determines whether a particular element of behavior or appearance is active for the part. IWindow, and classes derived from IWindow, are shipped with a default style definition that specifies default settings for class styles. The default style definition applies to all objects created from the class. The default style definition can be changed, and can be restored to its shipped settings. Changes to the default style are outside the scope of visual composition.

You should generally use the default style definition as a base for part styles. Then, set individual styles on or off if you want to override the default style setting or to ensure a setting regardless of the default setting.

Change part styles in a part property sheet as follows:

  1. Select the style property. A small selection button nhxslctb appears in the value column.
  2. Select the nhxslctb button to open the style property sheet.



    Style property graphic

  3. To specify whether styles can be set for the part, check or uncheck the Set value to nil (None) check box. If the check box is checked, no styles are set for the part. Therefore, the default style settings for the class are used. To set styles for the part, uncheck the check box. Part styles are then listed in the Property column.
  4. To specify whether the default style settings are used as a base for part styles, set the add default bits property. If it is set to true, the default style definition is used to provide default values. Otherwise, all styles are set to off by default.
  5. To set a style, select one of the following settings in the value column:
    <default>
    Accepts the default setting.
    off
    Specifies that the style is not used for the part.
    on
    Specifies that the style is used for the part.
  6. If you set a style on, set any mutually exclusive styles off. Mutually exclusive styles can be on either because they are explicitly set or because they are set by the default style.


Related procedures
Opening the Property Sheet for a Part
Working with VisualAge User Interface Parts

Related references
Style Properties