Results 1 to 14 of 14

Thread: where is the count property?? (treeview)

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    where is the count property?? (treeview)

    The TreeNodeCollection class is a collection class of TreeNode objects. so treeview1.Nodes is of type TreeNodeCollection

    Where in the HELL is the count property for the nodes???

    If I do treeview1.nodes.count it works.. but it doesn't come up in intellisense...

    http://msdn.microsoft.com/library/de...mberstopic.asp

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I think it's a bug in VB Intellisense. I've seen another member that's not there, in another class, but I can't remember what it was. I do remember it drove me crazy, as I find myself leaning on Intellisense quite a bit. Guess we still need to read the documentation.

    Interestingly, the TreeNodeCollection.Count property shows up in C#.

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Not a bug per say, go to Tools->Options And under Text Editor->Basic uncheck the Hide advanced members checkbox.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    What is an advanced member to Vb.NET IDE?
    \m/\m/

  5. #5

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    Originally posted by PT Exorcist
    What is an advanced member to Vb.NET IDE?
    surely not the friggin count property!!!

    possibly it is marked as advanced by error on the source code of the class (I am assuming C# is the source for those controls??)

  6. #6
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    Originally posted by crptcblade
    Not a bug per say, go to Tools->Options And under Text Editor->Basic uncheck the Hide advanced members checkbox.
    Cool, I did not know that was there, thanks. It's thrown me for a loop before, unchecking that option, what a stupid setting (or at least stupid implementation).

  7. #7

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    yeah seriously.. what is considered an "advanced" member anyway... (aside from the count property )

  8. #8
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: where is the count property?? (treeview)

    I would really be interested to hear Microsofts explination on this... I mean is to save resources or is to make VB users feel dumb?
    Magiaus

    If I helped give me some points.

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: where is the count property?? (treeview)

    That "Hide Advanced Members" option isn't available for VB, or at least it isn't in my IDE. VB shows two tabs on Intellisense: Common and All. C# just shows a single list and if you check "Hide Advanced Members" it will only show the ones that appear on the Common tab in VB. It is obviously done to reduce the number of members listed by removing those that are not commonly used. Maybe there have been some mistakes or slightly questionable criteria applied to decide which members are advanced but the motivation is fair enough. If you don't want an option applied then you don't apply it. Doesn't everyone go through the Options dialogue when they've installed a new application to see what settings there are available?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  10. #10
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: where is the count property?? (treeview)

    I asked 12 Vb programmers I work with and showed them this. They had no clue and most of them started asking me questions about what option to set to do blah blah blah.

    I do that myself I set all my options turn on line numbers....

    You are using 2005 in my 2005 the check box is disabled and yeah they have the Common and All. Pre 2005 in VB it is checked by default and only avaliable for VB.
    Magiaus

    If I helped give me some points.

  11. #11
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: where is the count property?? (treeview)

    Then obviously they have improved the situation in VS 2005. This is a manifestation of the idea that VB is supposed to be easier for the less technically-minded programmer. I never had this issue even when I was using VS.NET 2003. If you don't go through the Options dialogue then you're likely to miss some options I guess. The first thing I do when I install a new app is open the Options, Settings or Preferences dialogue. I suggest that everyone does the same.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  12. #12

    Thread Starter
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: where is the count property?? (treeview)

    yes.. this thread is pretty old (I started it in 2004)

    This was something that affected .NET 2003 (and possibly 2002) but was NOT an issue in 2005.

  13. #13
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: where is the count property?? (treeview)

    Hmmm... didn't notice the dates on the earlier threads; only the latest one. I guess searching can dredge up old threads.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  14. #14
    Fanatic Member dom_stapleton's Avatar
    Join Date
    Sep 2005
    Location
    Leigh-on-Sea, UK
    Posts
    665

    Re: where is the count property?? (treeview)

    I always check the Options, Preferences etc dialogs first, too...
    I use Microsoft Visual Basic 2008 Express Edition.

    If my post has been helpful, please rate it, unless you don't believe in Karma... which actually I don't!

    Resources:
    Visual Basic Tutorials (1, 2) | MSDN Library | Google | Krugle | Search Forums

    Free components:
    Windows Forms Components | XP Common Controls Library

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width