473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

JJBean

Hi All,

Can I set individual nodes to certain fonts/colors if I
like? and how do u do this?
Thanks,

JJBean
Nov 15 '05 #1
7 1140
JJBean,

I assume you are speaking about the TreeView control in the
System.Windows.Forms namespace. Unless you custom paint the control, you
can not set the font and colors of the node individually.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Treeview" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors if I
like? and how do u do this?
Thanks,

JJBean

Nov 15 '05 #2
Every node has a font property that you can set individualy.

myNode.NodeFont = new Font(tvBom.Font.FontFamily, tvBom.Font.Size,
FontStyle.Underline);

//you can set the color of the font by accessing the nodes forecolor

myNode.ForeColor = Color.Red;

hope this helps

MArco

"Treeview" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors if I
like? and how do u do this?
Thanks,

JJBean

Nov 15 '05 #3
Thats the last time I disagree with Nicholas...
Once set for the TreeView, all nodes keep the same font and color. The only
thing you can change is the fontStyle, like underline or bold.

Sorry about that.

Marco
"Treeview" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors if I
like? and how do u do this?
Thanks,

JJBean

Nov 15 '05 #4
ok How do I custom paint the control ?

Thanks for Responding !,

JJBean


-----Original Message-----
JJBean,

I assume you are speaking about the TreeView control in theSystem.Windows.Forms namespace. Unless you custom paint the control, youcan not set the font and colors of the node individually.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Treeview" <an*******@discussions.microsoft.com> wrote in messagenews:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors if I like? and how do u do this?
Thanks,

JJBean

.

Nov 15 '05 #5
How do I create an owner drawn treeview ??

Thanks,

JJBean
-----Original Message-----
Hi All,

Can I set individual nodes to certain fonts/colors if Ilike? and how do u do this?
Thanks,

JJBean
.

Nov 15 '05 #6
Correction,

after playing a little, you CAN change the forecolor of a Node

node.ForeColor = Color.Red

works

Marco
"Marco Martin" <ma**********@sympatico.ca> wrote in message
news:Jf*********************@news20.bellglobal.com ...
Thats the last time I disagree with Nicholas...
Once set for the TreeView, all nodes keep the same font and color. The only thing you can change is the fontStyle, like underline or bold.

Sorry about that.

Marco
"Treeview" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors if I
like? and how do u do this?
Thanks,

JJBean


Nov 15 '05 #7
Nicolas, Marco, what's the answer? how do you custom
paint the control, and more specifically can you custom
paint just certain nodes?

Thanks!

-----Original Message-----
ok How do I custom paint the control ?

Thanks for Responding !,

JJBean


-----Original Message-----
JJBean,

I assume you are speaking about the TreeView control
in the
System.Windows.Forms namespace. Unless you custom paint
the control, you
can not set the font and colors of the node

individually.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Treeview" <an*******@discussions.microsoft.com> wrote

in message
news:01****************************@phx.gbl...
Hi All,

Can I set individual nodes to certain fonts/colors

if I like? and how do u do this?
Thanks,

JJBean

.

.

Nov 15 '05 #8

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

Similar topics

6
by: JJBean | last post by:
Hi Oleg and All, Is this correct? Can I do this? <code> XmlDocument doc=new XmlDocument(); XPathNavigator nav = doc.CreateNavigator(); //Load the xml file. Change path if needed...
1
by: JJBean | last post by:
Hi, How do you write a filter that when it finds a match in a child node that it brings back all child nodes in that group? Ex. <Company> <LastName> <FirstName> <CompanyName>
1
by: JJBean | last post by:
How do u apply a XSLT transform to an XmlDocument in c#? Could you please show me this in code ? Thanks, JJBean
8
by: JJBean | last post by:
Hi All, How do I create a custom paint treeview control or an owner drawn treeview control ? Any tutorials on this anywhere? Thanks, JJBean
1
by: JJBean | last post by:
Hi, I am trying to use the select method in Dataset that filters using a string. sFindEmp = "LastName = 'Jones'"; dsEmployWC.Tables.Select(sFindEmp); This runs without error but when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
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...
0
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
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...

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.