473,671 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeNode.ShowCh eckBox

I am using VS 2005 and just wonder why I don't have this method?
Aug 18 '06 #1
11 7424
Because it doesn't exist?

There is a TreeView.CheckB oxes property (bool) if that helps any?

Marc

Aug 18 '06 #2
Hi,
My situation is I already set the TreeView.CheckB oxes property.
But in this treeview I don't want to show all items have checkboxes, but
some of them I want to show text and icon or text only.
For example:

Office as folder
Under this "Office" folder, there are items have checkboxes.

So I want to set the TreeNode.ShowCh eckBox = false for this "Office" folder.
"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ 74g2000cwt.goog legroups.com...
Because it doesn't exist?

There is a TreeView.CheckB oxes property (bool) if that helps any?

Marc

Aug 18 '06 #3
The best I can suggest is to just make this checkbox inert; you can do
this by handling the TreeView's BeforeCheck event, and (for the
folders) set "e.Cancel = true;" (where "e" is the event-args parameter)
- now it cannot be checked.

Alternatively, you're looking at custom icons, so faking it... which
may not work so well.

Marc

Aug 18 '06 #4
Sorry, in your first solution the "folder" still has checkbox but cannot be
checked, right?

I am using VS 2005 Team System, is this .NET 2?
It this is .NET 2, why there is no ShowCheckBox method of my TreeNode
object?

"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
The best I can suggest is to just make this checkbox inert; you can do
this by handling the TreeView's BeforeCheck event, and (for the
folders) set "e.Cancel = true;" (where "e" is the event-args parameter)
- now it cannot be checked.

Alternatively, you're looking at custom icons, so faking it... which
may not work so well.

Marc

Aug 18 '06 #5
Ah, I just noticed the showcheckbox property is a web control property.
So it does not apply to my desktop TreeNode ?

"Alan T" <al************ *@yahoo.com.auw rote in message
news:OU******** ******@TK2MSFTN GP05.phx.gbl...
Sorry, in your first solution the "folder" still has checkbox but cannot
be checked, right?

I am using VS 2005 Team System, is this .NET 2?
It this is .NET 2, why there is no ShowCheckBox method of my TreeNode
object?

"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
>The best I can suggest is to just make this checkbox inert; you can do
this by handling the TreeView's BeforeCheck event, and (for the
folders) set "e.Cancel = true;" (where "e" is the event-args parameter)
- now it cannot be checked.

Alternativel y, you're looking at custom icons, so faking it... which
may not work so well.

Marc


Aug 18 '06 #6
yes to both questionss
Aug 18 '06 #7
Use this (it's VB.NET so you'll need to translate it):
http://groups.google.com/group/micro...0571018c?hl=en

/claes

"Alan T" <al************ *@yahoo.com.auw rote in message
news:u0******** ******@TK2MSFTN GP05.phx.gbl...
Hi,
My situation is I already set the TreeView.CheckB oxes property.
But in this treeview I don't want to show all items have checkboxes, but
some of them I want to show text and icon or text only.
For example:

Office as folder
Under this "Office" folder, there are items have checkboxes.

So I want to set the TreeNode.ShowCh eckBox = false for this "Office"
folder.
"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******** **************@ 74g2000cwt.goog legroups.com...
>Because it doesn't exist?

There is a TreeView.CheckB oxes property (bool) if that helps any?

Marc


Aug 18 '06 #8
I found 3 icons, "folders", "checked", "unchecked"
and managed to change the icon when click the treenode.
But, I got a problem of the treeview's selectedimagein dex property.

I cannot set the selectedimagein dex to -1.
Because when I select a treenode, it will display one of the image in the
image list.
How do I get rid of the image when I select the treenode?

"Claes Bergefall" <lo*****@nospam .nospamwrote in message
news:Oo******** ******@TK2MSFTN GP02.phx.gbl...
Use this (it's VB.NET so you'll need to translate it):
http://groups.google.com/group/micro...0571018c?hl=en

/claes

"Alan T" <al************ *@yahoo.com.auw rote in message
news:u0******** ******@TK2MSFTN GP05.phx.gbl...
>Hi,
My situation is I already set the TreeView.CheckB oxes property.
But in this treeview I don't want to show all items have checkboxes, but
some of them I want to show text and icon or text only.
For example:

Office as folder
Under this "Office" folder, there are items have checkboxes.

So I want to set the TreeNode.ShowCh eckBox = false for this "Office"
folder.
"Marc Gravell" <ma**********@g mail.comwrote in message
news:11******* *************** @74g2000cwt.goo glegroups.com.. .
>>Because it doesn't exist?

There is a TreeView.CheckB oxes property (bool) if that helps any?

Marc



Aug 21 '06 #9
I thought you wanted to get rid of the checkbox for certain nodes?
Why are you using SelectedImageIn dex?

/claes

"Alan T" <al************ *@yahoo.com.auw rote in message
news:O8******** ******@TK2MSFTN GP03.phx.gbl...
>I found 3 icons, "folders", "checked", "unchecked"
and managed to change the icon when click the treenode.
But, I got a problem of the treeview's selectedimagein dex property.

I cannot set the selectedimagein dex to -1.
Because when I select a treenode, it will display one of the image in the
image list.
How do I get rid of the image when I select the treenode?

"Claes Bergefall" <lo*****@nospam .nospamwrote in message
news:Oo******** ******@TK2MSFTN GP02.phx.gbl...
>Use this (it's VB.NET so you'll need to translate it):
http://groups.google.com/group/micro...0571018c?hl=en

/claes

"Alan T" <al************ *@yahoo.com.auw rote in message
news:u0******* *******@TK2MSFT NGP05.phx.gbl.. .
>>Hi,
My situation is I already set the TreeView.CheckB oxes property.
But in this treeview I don't want to show all items have checkboxes, but
some of them I want to show text and icon or text only.
For example:

Office as folder
Under this "Office" folder, there are items have checkboxes.

So I want to set the TreeNode.ShowCh eckBox = false for this "Office"
folder.
"Marc Gravell" <ma**********@g mail.comwrote in message
news:11****** *************** *@74g2000cwt.go oglegroups.com. ..
Because it doesn't exist?

There is a TreeView.CheckB oxes property (bool) if that helps any?

Marc



Aug 21 '06 #10

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

Similar topics

2
2393
by: Benny Raymond | last post by:
More problems with this... When I run this code, the main form returns an invalid cast exception as it's executing the line "TreeNode n = (TreeNode) this.Nodes;" Does anyone know what would cause this? I just want to be able to use my own node class so that I can store extra data... =========================
0
1606
by: naija naija | last post by:
Hi All, I'm using the TreView Web Control for my MENU. And the Menu is populated from an XML file below. I want a way in which i can manipulate the XML when i want to manage it without having to open the file all the time.I tried creating an application in ASP.NET but its difficult getting an exact node to delete,insert etc b-cos of the XML structure that the control needs.. As anyboy tried doing this or any solutions available.. Thx...
3
1831
by: markaelkins | last post by:
Hi. I am trying to enter a variable in the treenodesrc of a treenode. I am basically trying to send an ID variable into sql to return different records. I've searched everywhere and cannot find the answer. I'd appreciate and help. Thanks. What I'm doing is creating a treeview with the structure as follows (this is the expanded view): - Item Status - Item Status Details
0
1838
by: fred | last post by:
I am using the clipboard to copy and paste a TreeNode but the Tag property does not seem to be copied. I use the Tag property for an Object that contains data relating to the TreeNode. The Tag property is fine when the TreeNode is put onto the Clipboard but the Tag property is always 'nothing' when I take the TreeNode from the Clipboard. Private Sub PutNodeOnClipboard(ByVal thisNode As TreeNode) Dim thisDataObject As New DataObject...
3
4028
by: tanya foster | last post by:
Hello, I am re-writing a visual basic .net application(visual studio 2003) in an asp.net application(visual studio 2005). The vb.net application relied on a treeview and hence, treenodes. The treeview and treenode class in asp.net is limited compared to vb.net's. In vb.net, the treenode had a nextnode property which was equivalent to finding the next sibling of the treenode. asp.net's treenode has a child property and a parent property....
1
5148
by: Alan T | last post by:
I have set the checkbox property of a treeview to true so every treenode has checkbox. How do I set certain nodes checkbox off? Just display an icon instead of a checkbox? My situation is I have folders and item to be displayed in treeview. So I want to display the folder as folder and item has checkboxes.
0
3298
by: divya1949 | last post by:
Create a windows c# application which will Read a xml file and populate nodes in the treeview. 1 On selection of treenode display the child nodes of that node in listview control 2. Provide following view properties to listview, through View menu a. Tile b. Icon
1
7385
by: jmDesktop | last post by:
I am trying to add nodes with keys to my treeview. I can add general nodes without problem with: //create new node TreeNode newNode = new TreeNode(myIdNumber); //create children TreeNode myPersonNode = new TreeNode(myPerson); TreeNode myAddressNode = new TreeNode(myAddress);
1
3271
by: AAaron123 | last post by:
If you see this posted twice - sorry. My news reader showed my first post as "No Longer Available" I have the following in a .css file. The treeNodes behave as if they were "a" elements. I can't get them to not respond to the mouse!
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
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
7433
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
5695
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
4224
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...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
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.