?
Solved

TreeView with visible property

Posted on 2002-04-06
5
Medium Priority
?
319 Views
Last Modified: 2010-05-02
Hello
  I'm using VB6. I try to set visible=false for some node in TreeView control but this error appear
  "Property is read-only"
  Why this error occur?
  First,I fetch all nodes into the TreeView, then I want to set visible only the node that match the criteria.
  How can I do?

Thanks,
OrasaJ.
 
0
Comment
Question by:orasaj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
sharmon earned 600 total points
ID: 6923538
That is a read only property and is not used like you are thinking it is.  It's to let you know if the node is visible or not in the treeview at the moment you call it.  If a node is not shown because it's a child of a parent that is collapsed it will return false, or if the node is not within the visible portion of the treeview it will return false, otherwise it is seen on the screen and will return true.

If I need to do what you are wanting to do, I generally will write a routine that will load the treeview as needed based on some certain criteria.

Regards,
Shannon
0
 

Author Comment

by:orasaj
ID: 6923592
Dear Sharmon
   Thank you for your comment. Because of the design of my program is hard to do like that, but if there is noway then I will modify my code. Thanks a lot.

Regards,
OrasaJ.
0
 
LVL 6

Expert Comment

by:sharmon
ID: 6924269
Nope, there is not any way to use that property like you are wanting to.  Sorry, take care.

Shannon
0
 
LVL 6

Expert Comment

by:sharmon
ID: 6924827
Your welcome for the info, but as far as the grade of B goes for this, did you decide I should get a B because I told you what you wanted to do couldn't be done?  Does seem a little unfair don't you think.  If you were not happy with my comment, you should have left the question open until you found something you liked better.

Regards,
Shannon
0
 

Author Comment

by:orasaj
ID: 6944314
Sharmon,
    Sorry for that, I don't know too much about the meaning and important of the grade I gived. It seem you upset for grade B. I just know that if I gived grade B mean I am not happy with the comment. Sorry again if I did the wrong thing and thank you for answer my question.

Regards,
OrasaJ.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question