Solved

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

Posted on 2002-07-22
7
160 Views
Last Modified: 2010-05-18
Code example please...
0
Comment
Question by:jackjeckyl
  • 3
  • 2
  • 2
7 Comments
 
LVL 69

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

929 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

8 Experts available now in Live!

Get 1:1 Help Now