|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Collection property problemHello
I have a custom component inherited from TreeView control with only one Node added. When I build the component, drag it from Toolbox to a Form and run my project there are two(!) nodes instead of one. The same thing happens with Listbox and other controls which have collection properties. Is there a way to avoid such behavior? Thanks in advance, Roman Dear Roman,
By default, there is no node added without any of your code. Did you add some code like treeView1.Nodes.Add([nodeName]) Did you try to call the coding from component and also from your winForm? -- Show quoteHide quoteHope this help and welcome to reply the testing result. Regards Ken Lin, Kam Hung Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com) MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k), MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET) Microsoft Community Star(Hong Kong & Taiwan) Microsoft Most Valuable Professional(.NET since 2003) MCT2004 & 2005 "Roman" <[rom***@mbsnetinc.com]> wrote in message news:%23DU$XpGTGHA.4960@TK2MSFTNGP12.phx.gbl... > Hello > > I have a custom component inherited from TreeView control with only one Node > added. > When I build the component, drag it from Toolbox to a Form and run my > project > there are two(!) nodes instead of one. > The same thing happens with Listbox and other controls which have collection > properties. > Is there a way to avoid such behavior? > > Thanks in advance, > Roman > > > > The only code I wrote in code window of my component is:
Inherits TreeView. I do add a node myself and do it by going to compoment design window, and modifying Nodes property in Properties window. Thanks, Roman Show quoteHide quote "MS MVP ³sÀA¶¯ for VB.NET" <kenlin2***@hotmail.com.no-spam> wrote in message news:usNrnILTGHA.1688@TK2MSFTNGP11.phx.gbl... > Dear Roman, > > By default, there is no node added without any of your code. > Did you add some code like > > treeView1.Nodes.Add([nodeName]) > > Did you try to call the coding from component and also from your winForm? > > > -- > Hope this help and welcome to reply the testing result. > > Regards > Ken Lin, Kam Hung > Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com) > MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k), > MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET) > Microsoft Community Star(Hong Kong & Taiwan) > Microsoft Most Valuable Professional(.NET since 2003) > MCT2004 & 2005 > > > "Roman" <[rom***@mbsnetinc.com]> wrote in message > news:%23DU$XpGTGHA.4960@TK2MSFTNGP12.phx.gbl... >> Hello >> >> I have a custom component inherited from TreeView control with only one > Node >> added. >> When I build the component, drag it from Toolbox to a Form and run my >> project >> there are two(!) nodes instead of one. >> The same thing happens with Listbox and other controls which have > collection >> properties. >> Is there a way to avoid such behavior? >> >> Thanks in advance, >> Roman >> >> >> >> > > |
|||||||||||||||||||||||