Results 1 to 4 of 4
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    if statement partucular... in treeview (6.0)

    How to colorize only the item selected with red color?
    to dthe default all items font are black...
    maked tath but not work...
    my prob is when i scroll item with arrow keybord.
    In effect:
    is the item black i scroll on it font red but if is red clorize black
    Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)

    If Form1.TreeView1.SelectedItem.ForeColor = vbRed Then
    Form1.TreeView1.SelectedItem.ForeColor = vbBlack
    Else
    Form1.TreeView1.SelectedItem.ForeColor = vbRed
    End If

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: if statement partucular... in treeview (6.0)

    You more or less asked the same question in <post:=742,412>post 742,412</post:>.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: if statement partucular... in treeview (6.0)

    Hans but the old post is around a solution to colorize font of item in treeview...
    Now i have found the soultion, and not the good code:-)

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: if statement partucular... in treeview (6.0)

    I assume that you want to color the text of the active node. As I pointed out in the other thread, that won't work because VB highlights the active node, so you won't see the color.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •