• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

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

Code example please...
0
jackjeckyl
Asked:
jackjeckyl
  • 3
  • 2
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
aikimarkCommented:
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
 
jackjeckylAuthor Commented:
Good idea, but not what I wanted.  Thanks.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Éric MoreauSenior .Net ConsultantCommented:
What do you want?
0
 
aikimarkCommented:
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
 
jackjeckylAuthor Commented:

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
 
jackjeckylAuthor Commented:
Never mind, I got it.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now