Solved

TreeView with visible property

Posted on 2002-04-06
5
310 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now