473,508 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TreeNode Selected Item Color

How do you change the color of the selected item (ie clicked) in a
TreeView control ?


Aug 8 '07 #1
3 4125
When you click node its back color is changed for you automatically by the
control. If you mean persistent change of color, probably you need to handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?
"Ian Semmel" <an****@rocketcomp.com.auwrote in message
news:DC5F87498A294976AD77FB32724AD8A0@DIMITY...
How do you change the color of the selected item (ie clicked) in a TreeView
control ?

Aug 8 '07 #2

From: AlexS [mailto:sa***********@SPAMrogers.comPLEASE]
When you click node its back color is changed for you automatically by
the
control. If you mean persistent change of color, probably you need to
handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?
Well, it would be something like SelectedNodeBackColor if there were
such an animal

"Ian Semmel" <an****@rocketcomp.com.auwrote in message
news:DC5F87498A294976AD77FB32724AD8A0@DIMITY...
How do you change the color of the selected item (ie clicked) in a
TreeView
control ?
Aug 10 '07 #3
The you can use TreeNode.BackColor property

Does it work for you?

"Ian Semmel" <an****@rocketcomp.com.auwrote in message
news:1518D636ABB7413B9D77980F87B0A3FB@DIMITY...
>
>From: AlexS [mailto:sa***********@SPAMrogers.comPLEASE]

>When you click node its back color is changed for you automatically by
the
control. If you mean persistent change of color, probably you need to
handle
selection change event.

If question is about what property to use, it's TreeNode.ForeColor

What exactly are you trying to achieve?

Well, it would be something like SelectedNodeBackColor if there were
such an animal

>"Ian Semmel" <an****@rocketcomp.com.auwrote in message
news:DC5F87498A294976AD77FB32724AD8A0@DIMITY...
How do you change the color of the selected item (ie clicked) in a
TreeView
control ?

Aug 11 '07 #4

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

Similar topics

2
6244
by: Sean | last post by:
Hi, I have a treeview and user can right click the treenodes, depending on the nodes, different shortcut menu will appear. I want only the shortcut menu to appear if the point of the right...
2
1965
by: The Kiddie | last post by:
Hi Guys, I am doing some work with a treenode and I want to record the selected item, and it may change while the user is performing some tasks and I need to know which one was originally...
3
1817
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...
3
2039
by: Matthew Woods | last post by:
Hi, does anyone know how to select a treenode with the first click? the first click on a treeview will highlight the node under the mouse when it was clicked BUT that node isn't actually selected...
11
4725
by: Mano | last post by:
When settiing a TreeNode to bold the text label of that node is clipped. As describedin in the Bug Rebort FDBK16963 I set the underliying TreeView Fond to be bold. Now I have the strange...
3
4019
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...
2
4471
by: andreas | last post by:
Hi, I have a problem with treenode I know the node.text of a selected node in a variable and then some nodes are removed but not the selected node who is no more selected (so using index and...
9
3691
by: vincent90152900 | last post by:
How to pop up different text base on the selected TreeNode? I want to pop up different Text base on the selected TreeNode of the TreeView component. So, I create a TreeView and a ModalPopupExtender....
0
3276
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. ...
0
7227
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,...
0
7331
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,...
0
7391
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...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
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...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
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...
0
3204
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...
0
1564
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 ...

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.