RAD Studio (Common)
Automating the Creation of Fields with the Class Explorer

Using the Class Explorer you can automate the creation of fields

To automate the creation of fields:

  1. Open the Delphi Class Explorer window by choosing ViewDelphi Class Explorer.
  2. In the Class Viewer pane, click a class into which you wish to add a new field.
  3. Click the right mouse button. In the appeared context menu choose the Add Field item. The Add Field dialog box appears.
  4. Into Field name type the name of the field to be added.
  5. In the Add to class combo box, select the class to which you wish to add the field. By default, the class currently selected in the Class Viewer pane is prompted. You can, however, change this to any other available class selecting it from the drop-down list in the combo box. Select the @unitclass to add the field to the global scope.
  6. In the Type combo box, select the type of the field. You can select one of the predefined types from the drop-down list in the combo box or you can type in any other existing type.
  7. In the Visibility group, select one of the visibility specifiers. The selected visibility specifier will be applied to the field being created.
  8. Click OK. The code declaring the field with the specified properties will be inserted into the specified class.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!