473,441 Members | 2,052 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,441 software developers and data experts.

TreeNode truncating text after font change

It looks like (looks like! ... not that there is!) there's a bug in the
TreeNode object. When you change the font, it does not readjust its size
appropriately.

The following code shows the boldface text truncated with everything after
"W" removed.

private void Form1_Load(object sender, System.EventArgs e) {
TreeNode newNode = new TreeNode("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
treeView1.Nodes.Add(newNode);
newNode = new TreeNode("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
newNode.NodeFont = new Font(this.Font, FontStyle.Bold);
treeView2.Nodes.Add(newNode);
}

What I want to know is, how do I work around this? I need some of the nodes
to be in bold!

Thanks,
Jon
Nov 15 '05 #1
0 1545

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

Similar topics

2
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...
4
by: Patrick Noll | last post by:
hi ng, i have a problem when i try to change the text property of a TreeNode just before the user is able to edit this property. Example: // Label before anything happens... TreeNode.Text =...
2
by: Fabio Cannizzo | last post by:
I execute the following code: myTreeNode.NodeFont = new Font( ... ); However this does not change the Bounds of the TreeNode and as a result the TreeNode's Text does no longer fit and it in...
1
by: Juan Romero | last post by:
Hey guys, I have been playing with different fonts for the nodes of a treeview. When I change the font to bigger sizes, the text are of the treenode can no longer display all the text. I only...
10
by: Juan Romero | last post by:
Hey guys, I have been playing with different fonts for the nodes of a treeview. When I change the font to bigger sizes, the text area of the treenode (label) no longer displays all the text. I...
11
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...
4
by: pamelafluente | last post by:
Hi I noticed that if I use a bold font for 1 TreeNode of a TreeView several times the string does not fit anymore and gets truncated. How can I avoid that ? Any suggestionis appreciated ...
9
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....
1
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. ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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
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,...
0
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
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...

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.