Share via


Properties Window Buttons

Four default buttons are displayed on the toolbar for the Properties window: Categorized, Alphabetized, Properties, and Property Pages. In Visual C# and Visual Basic, an additional button, Events, is displayed. In Visual C++, two further buttons, VC++ Messages, and VC Overrides, can be displayed on the toolbar depending on the specifications of the project type selected. For more information and a description of the buttons on the Properties window, see Properties Window.

Implementation of Properties Window Buttons

If you click the Categorized button, the IDE calls the ICategorizeProperties interface on the displayed object or objects to sort properties by category. ICategorizeProperties is implemented on the IDispatch object that is presented to the Properties window.

There are 11 predefined property categories with negative values. You can define your own custom categories, but be sure to assign them positive values to distinguish them from the predefined categories.

MapPropertyToCategory returns the appropriate property category value for the specified property. GetCategoryName returns a string containing the category name. You only need to provide support for your custom category values because the IDE knows the names of the standard property category values.

Clicking the Alphabetized button displays the properties in alphabetical order by property name as retrieved by IDispatch using a localized sorting algorithm.

When the Properties window is open, the Properties button is automatically shown as clicked. In other areas of the IDE, the same icon is used to display the Properties window if it is hidden.

The Property Pages button is dimmed if ISpecifyPropertyPages is not implemented for the selected object. Property pages display configuration-dependent properties and are normally associated with solutions and projects, but they can be associated with project items (such as in Visual C+).

Note

Toolbar buttons cannot be added to the Properties window using unmanaged code. To add a toolbar button you need to create a managed object that derives from PropertyTab.

See Also

Other Resources

Properties Window and Property Pages