Solved

TreeView with visible property

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

778 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