Custom Form Properties

G

Guest

I am having an issue where I have added a custom property to one of my forms,
but it doesn't show up in the properties window in the designer window. The
property shows up in the intellisense in the code window. Any help is
appreciated.
 
H

Herfried K. Wagner [MVP]

Wade said:
I am having an issue where I have added a custom property to one of my
forms,
but it doesn't show up in the properties window in the designer window.
The
property shows up in the intellisense in the code window. Any help is
appreciated.

Make sure the 'Browsable' attribute is specified for the property. If this
doesn't solve your problem, post your code.
 
A

Armin Zingler

Wade said:
I am having an issue where I have added a custom property to one of
my forms, but it doesn't show up in the properties window in the
designer window. The property shows up in the intellisense in the
code window. Any help is appreciated.

It doesn't show because the designer creates and displays an instance of the
base class of the form, not an instance of your Form. It can't because you
are about to design your Form and the project might not have been compiled
yet. Consequently, the base class does not have your properties. The
designer shows, how your Form will "look like if it will be created later".

If you derived another Form from your Form, the property would be shown in
the property window if you open the derived Form in the designer.


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top