Collection property problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roman

    #1

    Collection property problem

    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




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

    #2
    Re: Collection property problem

    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(.N ET since 2003)
    MCT2004 & 2005


    "Roman" <[romanm@mbsnetin c.com]> wrote in message
    news:%23DU$XpGT GHA.4960@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > Hello
    >
    > I have a custom component inherited from TreeView control with only one[/color]
    Node[color=blue]
    > 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[/color]
    collection[color=blue]
    > properties.
    > Is there a way to avoid such behavior?
    >
    > Thanks in advance,
    > Roman
    >
    >
    >
    >[/color]


    Comment

    • Roman

      #3
      Re: Collection property problem

      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" <kenlin2000@hot mail.com.no-spam> wrote in message
      news:usNrnILTGH A.1688@TK2MSFTN GP11.phx.gbl...[color=blue]
      > 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(.N ET since 2003)
      > MCT2004 & 2005
      >
      >
      > "Roman" <[romanm@mbsnetin c.com]> wrote in message
      > news:%23DU$XpGT GHA.4960@TK2MSF TNGP12.phx.gbl. ..[color=green]
      >> Hello
      >>
      >> I have a custom component inherited from TreeView control with only one[/color]
      > Node[color=green]
      >> 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[/color]
      > collection[color=green]
      >> properties.
      >> Is there a way to avoid such behavior?
      >>
      >> Thanks in advance,
      >> Roman
      >>
      >>
      >>
      >>[/color]
      >
      >[/color]


      Comment

      Working...