Setting an individual node in a tree view to have strikeout.

  • Thread starter Thread starter Mufasa
  • Start date Start date
M

Mufasa

How can I set the text for a specific node to be strikeout? It's there but
it's read only.

TIA - Jeff.
 
Mufasa said:
How can I set the text for a specific node to be strikeout? It's there but
it's read only.

Dim f As New Font( _
Me.TreeView1.Font, _
Me.TreeView1.Font.Style Or FontStyle.Strikeout _
)
For i As Integer = 1 To 10
Dim tn As New TreeNode()
tn.Text = "Item " & i
If i Mod 2 = 0 Then
tn.NodeFont = f
End If
Me.TreeView1.Nodes.Add(tn)
Next i
///
 
Herfried,

use the following syntax:
Dim f As Font = New Font(Me.treeView1.Font.FontFamily, 12,
FontStyle.Strikeout)
treeView1.Nodes(1).NodeFont = f
 
Mufasa,
syntax is:

Dim f As Font = New Font(Me.treeView1.Font.FontFamily, 12,
FontStyle.Strikeout)
treeView1.Nodes(1).NodeFont = f
 
Back
Top