在main 中加入以下代码既可。
TypeDescriptor.AddAttributes( _
   
GetType(Specialized.StringCollection), _
   
New EditorAttribute( _
       
"System.Windows.Forms.Design.StringCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", _
         
GetType(System.Drawing.Design.UITypeEditor)))

refer to http://stackoverflow.com/questions/2043579/adding-editor-editorattribute-at-run-time-dynamically-to-an-objects-property

 

posted on 2011-04-11 09:26  懒懒的呐喊  阅读(1256)  评论(0)    收藏  举报