Solved

Is it possible for only children of a treeview to have checkboxes?

Posted on 2002-07-22
7
166 Views
Last Modified: 2010-05-18
Code example please...
0
Comment
Question by:jackjeckyl
[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
  • 2
7 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7170570
I have done it in the past (using VB5 - there were no checkbox at this time). You have to use images and toggle it yourself.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7170983
1. you will need to set the treeview properties so that each node can display an image.
2. add an imagelist control to your form
3. add two pictures to the imagelist's picture collection.  One picture will be a square.  The other picture will be a square with a check.
4. When you add a child node, set the image index = empty-square picture index.
5. When the user double clicks the node, change the image index of the node = checked picture index.
0
 

Author Comment

by:jackjeckyl
ID: 7172980
Good idea, but not what I wanted.  Thanks.
0
Independent Software Vendors: 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!

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7173038
What do you want?
0
 
LVL 45

Expert Comment

by:aikimark
ID: 7173235
jackjeckyl,

You've accepted emoreau's comment as the solution to your problem, yet your most recent comment indicates that this is not an acceptable solution.  What more do you need?

emoreau described it. I detailed it.  It's up to you to do it (now).
0
 

Author Comment

by:jackjeckyl
ID: 7175446

I accepted the comment meaning thats what I'd pursue thinking you can't have just straight checkboxes in children.  I wanted true checkboxes, not pictures of checkboxes.  As to follow up, how am I supposed to change all the children to "checked boxes" if someone clicks on the parent and changes that image to a checkbox?  In other words, If you change a parent to a checked box image, all the children have to have checked box images...
0
 

Author Comment

by:jackjeckyl
ID: 7175553
Never mind, I got it.
0

Featured Post

Independent Software Vendors: 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

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

752 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