Solved

TreeView with visible property

Posted on 2002-04-06
5
318 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 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

718 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