Adding and customizing controls to Property Manager page

Edit ArticleEdit Article

Framework will automatically generate the best suitable control for the public property in the data model. For example for all numeric properties the number box control will be generated. For all string properties text box control will be generated. For all complex types group box will be generated.

The style of the controls can be customized via attributes.

Accessing controls

Access to controls is provided via IPropertyManagerPageControlEx wrapper interface. Common properties can be accessed via this interface (such as control id, enable or visible flags). Underlying native SOLIDWORKS control can be accessed via IPropertyManagerPageControlEx::SwControl property. It returns the pointer to corresponding IPropertyManagerPageControl which can be cast to specific control such as IPropertyManagerPageSelectionbox, IPropertyManagerPageCombobox, IPropertyManagerPageTextbox etc.

All controls can be accessed via IPropertyManagerPageEx::Controls property.


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial