PropertyGrid Name Property


Derek Hart

I am trying to use the property grid in a design time environment, and I
want to override the Name property. This seems to be easy to do with most
properties, but the name property is stubborn. So I cannot put my own
validation on the Name property. For example, this would only allow
MyControlName to be entered as a Name for a control. But this overload does
not even register.

Public Overloads Property Name() As String


Return MyBase.Name

End Get

Set(ByVal value As String)

If value = "MyControlName" Then MyBase.Name = value

End Set

End Property

Do I need to set a private variable, or should the Name property be a
string, or some other base type?


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