473,804 Members | 3,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Checkbox in TreeView control

Does anyone know how to disable a single check box in a Windows Forms
TreeView control.
Jun 9 '06 #1
3 18205
Handle the BeforeCheck event and cancel any attempts to check it.

/claes

"James Lennon" <Ja*********@di scussions.micro soft.com> wrote in message
news:93******** *************** ***********@mic rosoft.com...
Does anyone know how to disable a single check box in a Windows Forms
TreeView control.

Jun 9 '06 #2
This will stop a user from checking the check box but the control does not
look disabled. I can set the foreground color of the text but not the text
box. Is there a way to get a handle to the actual text box.

"Claes Bergefall" wrote:
Handle the BeforeCheck event and cancel any attempts to check it.

/claes

"James Lennon" <Ja*********@di scussions.micro soft.com> wrote in message
news:93******** *************** ***********@mic rosoft.com...
Does anyone know how to disable a single check box in a Windows Forms
TreeView control.


Jun 9 '06 #3
I assume you mean checkbox (you wrote text box). The checkbox is just an
image in the state image list for the tree view (Windows generates 2 images
for you, one checked checkbox and one unchecked) so simply changing the
state image index for the node should work. Ofc, you'll need to add the
image for a disabled checkbox first. You can also replace the images with
your own if you'ld like. Here are some threads that might be of interest:

http://groups.google.com/groups?as_q...=2006&safe=off
/claes

"James Lennon" <Ja*********@di scussions.micro soft.com> wrote in message
news:29******** *************** ***********@mic rosoft.com...
This will stop a user from checking the check box but the control does not
look disabled. I can set the foreground color of the text but not the
text
box. Is there a way to get a handle to the actual text box.

"Claes Bergefall" wrote:
Handle the BeforeCheck event and cancel any attempts to check it.

/claes

"James Lennon" <Ja*********@di scussions.micro soft.com> wrote in message
news:93******** *************** ***********@mic rosoft.com...
> Does anyone know how to disable a single check box in a Windows Forms
> TreeView control.


Jun 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
19899
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a dynamic menu by collating data from a Sql Server Table. Many thanks.
0
974
by: Satya Bojanapally | last post by:
Hi, How to use TreeView control for client side script with checkbox checked/unchecked. Regards, Satya
0
1270
by: Krish | last post by:
Hi all, I have a TreeView control on a windows form with checkboxes enabled. I am trying to make certain checkboxes have a checked and shaded status but I am unable to set a node's checkbox property to the Indeterminate status (since it appears to only take a bool and not a CheckState enum). Is there any way around this? Thanks! Krish
1
2177
by: Srinivasa Raghavan | last post by:
Hi All, I have some doubts on the Treeview control and Form Authentication 1) will Form Authentication work if cookies are disabled. 2) I have problem in the following code (TreeView Control with checkbox)
0
1102
by: marius | last post by:
Hi I'm trying to disable the TreeView control of the Microsoft WebControl package. When I set the disabled-property (from javascript), the control is blured/greyed out as expected, but it still handles clicks from the user, expanding and selecting nodes. Does anyone have ideas for a workaround on this? Thanx!
3
2837
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%"" BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""0"" ID=""Table1""> " & vbNewLine) writer.Write(" <tr>" & vbNewLine) writer.Write(" <td>" & vbNewLine)
1
2392
by: yxq | last post by:
Hello, I need the treeview control like Explorer with checkbox for selecting the whole partition or folders, where to download or for sale? Thanks
1
5036
by: japi | last post by:
Hi all, I have a TreeView control in my ASP.NET 2.0 Web application with checkboxes enabled. I would like to generate a postback when a user ticks or unticks a checkbox. As far as i know, this is not possible out of the box. Does anyone have a solution/workaround/hack for this?
1
2109
by: joerozario | last post by:
dear friends, i have treeview control in asp.net 2005. there is an option to show ckeck box. when i click the root node check box, i want all the sub nodes to be checked. how to do that.? how to get onclick event of the any check box in the treeview.
0
10586
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6856
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.