Partager via


New Property Dialog Box

Makes it possible for you to create a custom property and specify attributes for that property.

This dialog box appears when you choose New Property on the Form menu that appears when the Form Designer is open or the Class menu that appears when the Class Designer is open.

You can also create Access and Assign methods. For more information, see Access and Assign Methods and How to: Create Access and Assign Methods.

  • Name
    Specifies the name of the new property.

  • Visibility (Class Designer only)
    Specifies the level of visibility for the property:

    • Public   Access is available from anywhere in an application.

    • Protected   Restricts access to the property to class members and subclasses can access protected properties. Object instances cannot access this property.

    • Hidden   Restricts access to the property to class members only. Object instances and subclasses cannot access hidden properties.

    For more information, see Protecting and Hiding Class Members.

  • Access Method
    Specifies if an Access method is created for the new property. The code in an Access method is executed whenever the property is queried. Select this check box to create an Access method for a property.

  • Assign Method
    Specifies if an Assign method is created for the new property. The code in an Assign method is executed whenever you attempt to change the value of the property. Select this check box to create an Assign method for a property.

  • Default Value
    Specifies a default value for the property. The default value is preset to False (.F.).

  • Description
    Contains the method description to be displayed at the bottom of the Properties window in the Class Designer and, if the property is not protected, in the Form Designer.

See Also

Tasks

How to: Add Properties and Methods to a Form

How to: Add Properties to Classes

Concepts

Class Designer

Reference

Form Designer

New Method Dialog Box

Edit Property/Method Dialog Box

Other Resources

Dialog Boxes (Visual FoxPro)