Overriding Attributes

To customize the class and make it look and behave like the Close Window buttons that are currently on the Display_data and Create_report frames, you must change five attributes. Changing an attribute value on a class at build time to a value other than the default is called overriding an attribute. The first attribute to override is the width attribute.
To override the width attribute, follow these steps:
  1. Click on the Attributes for the class in the Class Properties list (on the left side of the Class Editor).
  2. Scroll to the width attribute (in the list of attributes on the right side of the Class Editor).
  3. Override the width attribute by right-clicking on the width attribute row and selecting Override.
    Overriding the width attribute
    An 'O' appears in the State column for the width attribute, indicating that the attribute is overridden.
    Overridden width attribute
  4. In the Initial Value column for width, enter 85.
    The default width of all new Close Window Buttons will be 85 pixels.
Using the same general procedure, override the following four attributes on the Close Window Button class and set them to the indicated value:
  • commandOnClick: end;
    Note the semicolon at the end of the command.
  • height: 30
  • label: Close Window
  • name: CloseWindowButton
When you are finished, close the Class Editor by clicking Yes in the confirmation dialog box to save your changes.