You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Code Builders > The Property Builder
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

The Property Builder

The Property Builder can assist you in the process of creating new property procedures generating and inserting most of the required code.

To create a new property:

  1. Open the code module where you want to insert the property.
  2. Click New Property on the Code Edit Tools toolbar or select the same entry in the CodeSMART main menu (quick toolbar and menu references are available). The New Property dialog box will be displayed.
    Property Builder
  3. Specify the name of the new property in the corresponding text box. CodeSMART automatically proposes a private variable, named in accordance with the current naming standard settings, to hold the property value.
  4. Select a standard or specify a new data type.
  5. Optional. Specify a default value for the property. CodeSMART will create the code that will initialize the property with the default value.
  6. Set the property's type to either Read/Write, Read-only, Write-only or Write once/Read many according to your needs.
  7. Set the property's scope to either Public, Private or Friend according to your needs.
  8. In the Details section specify if you want to implement a Set instead of a Let property and if you want CodeSMART to build the code that initializes (creates) and respectively destroys the object.

    If the current component is a User Control you can initialize the property using the InitProperties event instead of Initialize. You can also preserve the property value using the property bags.
  9. Specify if you want the property to be registered as default by marking the corresponding check-box.
  10. Press Insert in order to insert the property template into the current Code window and then automatically close the dialog box, or Insert and New if you want to avoid the dialog being closed and continue with a new property.
See also
Code Builders Overview
The Method Builder
The Collection Class Builder
Switch Assignment Values
The SQL/Long String Builder

Back To Top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Code Builders