user3646717
user3646717

Reputation: 1095

All control's properties disabled in Visual Studio

I have a parent form and a child form that inherits from the former. In design mode all the inherited controls' properties are disabled. How can I change these properties in the child form?

Here is a screenshot of the designer. Note how I have selected a text box and all its properties are disabled (greyed out).Screenshot

Upvotes: 3

Views: 2416

Answers (1)

BJ Myers
BJ Myers

Reputation: 6813

By default, the Windows Forms designer creates components with the private access modifier. This means that an inheriting form will render the controls, but cannot modify them.

To fix this, open the base form in the designer. Select the control(s) that you want to be able to modify and change the Modifiers property to Protected.

Changing modifiers to protected

Important: After this change, you must rebuild the base form's project for changes to show up in the inheriting form's designer view.

Upvotes: 4

Related Questions