Property Grid in VS.Net

N

Nice Chap

I have created a sub class from System.Windows.Forms.TextBox and added a
property which is an object ( name of the property is EditProperties).

Public Class EditPropertiesClass

Public Property SupportsInsert as boolean
Public Property SupportsUpdate as boolean
Public Property SupportsQuery as boolean
....and so on
End Class

When I click on the text box in VS.Net designer and then go to the property
window, it lists EditProperties but it is disabled, it does not provide +
that I can click on and get the inner properties of EditProperties. Is there
any attribute that I need to set to make Object properties editable from the
designer property window ? please...
 
M

Michael Maes

Just as a sample:

<EditorBrowsable(EditorBrowsableState.Always), _ (This would be for IntelliSense)
Category("Data"), _ (This is where you would like to have the property appear in the Property-Window of the IDE)
Browsable(True), _ (This would be for the Property-Window.)
Bindable(True), _
Description("The data source for the dropdown list."), _ (This would be what appears at the bottom of the Property-Window.)
TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design"), _
RefreshProperties(RefreshProperties.All)> _
Public Overloads Property DataSource() As Object
........
End Property

Regards,

Michael
 

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