Collection property problem

R

Roman

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
 
M

MS MVP ³sÀA¶¯ for VB.NET

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
 
R

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

MS MVP ³sÀA¶¯ for VB.NET said:
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 said:
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
 

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