|
-
Feb 8th, 2012, 05:49 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Treeview Text not showing correct
Hi just ran into an odd problum with treeview node text I add a top node and I wanted it's text in bold. The bold works fine but half the text is missing
Here an example
vbnet Code:
Dim sFont As New Font("Verdana", 8, FontStyle.Bold)
Tv1.Nodes.Add("TOP", "0123456789", 0, 0)
The code above for me only shows 012345678 and not showing the 9 any ideas if I use regular style it works fine only happens when I apply the bold style.
-
Feb 8th, 2012, 05:53 PM
#2
Hyperactive Member
Re: Treeview Text not showing correct
Did you limit the amount of characters that can be entered for the textbox.
Check the textbox properties.
-
Feb 8th, 2012, 06:05 PM
#3
Thread Starter
Fanatic Member
Re: Treeview Text not showing correct
 Originally Posted by Ritzky
Did you limit the amount of characters that can be entered for the textbox.
Check the textbox properties.
Sorry should of said label it the lable that not showing text right well it showing but it skiping chars
Ok I uploaded an image of the problum

This is the code as you can see it skips most of the label out
Code:
Tv1.Nodes.Add("TOP", "This is a long string", 0, 0)
-
Feb 9th, 2012, 03:15 AM
#4
Thread Starter
Fanatic Member
Re: Treeview Text not showing correct
Still haveing problums with this node label any ideas, I even tryed chnageing the font and it still only shows half of what ment to be in the label. this is the code I am using I am missing somerthing out
vbnet Code:
Dim sFont As New Font("system", 8, FontStyle.Bold)
Tv1.Nodes(0).NodeFont = sFont
when adding this parent node
Tv1.Nodes.Add("TOP", "Clips123456789abcdef", 0, 0)
result of the label will be Clips123456789abc choping of the rest of the chars any ideas thanks.
-
Feb 9th, 2012, 03:31 AM
#5
Re: Treeview Text not showing correct
Take a look here.
Apparently the issue can be solved by setting the Font property on the TreeView to a bold font, instead of setting it on the individual TreeViewNodes.
-
Feb 9th, 2012, 06:34 PM
#6
Thread Starter
Fanatic Member
Re: Treeview Text not showing correct
Thanks Atheist that link was usfull now fixed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|