Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

How to use the editor attribute?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam - 22 Jun 2007 01:15 GMT
Dear Sir,

Please I need help on how to use the editor attribute. I am trying to learn
how to create User Controls. I created a UserControl using VB.NET that
contine a treeview control. I want to expose the treeview nodes collection
and support the design-time environment by using the Editor attribute. But
when I tried to use it I get the following error message:
(value of type 'System.Windows.Forms.TreeNodeCollection' cannot be converted
to '1-dimensional array of System.Windows.Forms.TreeNodeCollection') .

The editor attribute takes two parameters
(Typename as string, base typename as string)
(Typename as string, base typename as system.Type)
(Typename as system.type, base typename as system.Type)

I tried for many times during the last five days to resolve the problem but
I could not do it. Please some one help me and tell me how to write the
editor attribute the correct way.

The following is my tree node collection property:  
<Browsable(True), _
   Description("Gets the TreeView Nodes collection"), _
   Category("TreeView"), _
   
DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _
   Editor(System.Windows.Forms.TreeNodeCollection,
System.Windows.Forms.TreeNodeCollection)> _
   Public ReadOnly Property Nodes() As TreeNodeCollection()
       Get
           Return Me.tvTreeView.Nodes <------ (the error appears in this
line)
       End Get
   End Property

Thank you.
Sam - 22 Jun 2007 09:21 GMT
Hello,

I apologize for posting my Question in the wrong discussion group. I’m going
to post it again in the correct discussion group.

Thanks.

> Dear Sir,
>
[quoted text clipped - 31 lines]
>
> Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.