Solved

C# TreeView that shows CheckBoxes ONLY in chosen Nodes

Posted on 2004-09-09
11
2,842 Views
Last Modified: 2008-02-01
Hello,

Could you please help me to create a TreeView (C#). The TreeView must have CheckBoxes only in some Nodes (parent or children does not matter) chosen at run-time. I do not want my TreeView to have a CheckBoxes in any Node, as it is in .Net Framework now.

Thank you.
0
Comment
Question by:AJBykov
  • 4
  • 4
11 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12020524
there is a property of the node which says whether or not there is a checkbox.
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12020526
i am not quite sure what else you are asking for.
0
 

Author Comment

by:AJBykov
ID: 12021562
Every TreeNode has Checked property. When I set TreeView -> CheckBoxes property every Node in TreeView gets a CheckBox. I do not need a CheckBox near every Node. I would like to decide in run-time which node has a CheckBox and which does not. Looks like I have to create my own TreeView...
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 500 total points
ID: 12021629
you would need to override the painting of the treeview (not trivial) or deal directly with the API ...

if you want to do this I can give you some examples ...
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:AJBykov
ID: 12022208
Yes, please. I will override the painting of the TreeView. If you could provide me a sample I would greatly appreciate that.
0
 

Expert Comment

by:shilpa2784
ID: 12024074
Do you want to get the checkbox for a specific node at the runtime?? If yes i dont think it is possible with the existing treeview control ....u have to override and create your own treeview control
0
 

Author Comment

by:AJBykov
ID: 12026596
Yes, I am doing that right now. Could you tell me that the button "Accept" (near a comment) means?
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 12027265
it means to accept that comment as your answer ... I started working on this last night but its not only a few lines of code, I will try to get back to it this evening.
0
 

Author Comment

by:AJBykov
ID: 12027319
Thank you!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

19 Experts available now in Live!

Get 1:1 Help Now