treeview text properties 
Author Message
 treeview text properties

Hi ,

I wanted to know if there is a way to change text properties of the
node(x).text in a tree view,
For example I have the following code that searches a tree for a string,
and the appends *** before and after
the found string. What I would like to do is instead of placing *** I would
like to highlight or change color or underline the text, Can this be Done ?

Private Sub Tree_Search(target As String, ByRef location As Integer)

    On Error GoTo errhand

    Dim X As Integer
    Dim hitcnt As Integer

    hitcnt = 0

    For X = location To tvDossier.Nodes.count
        If InStr(UCase(tvDossier.Nodes(X).Text), UCase(target)) > 0 Then
             tvDossier.Nodes(X).EnsureVisible
             tvDossier.Nodes(X).Selected = True
            '  this is where I need to change text properties!!
             tvDossier.Nodes(X).Text = "***" & tvDossier.Nodes(X).Text &
"***"
             location = X + 1
             hitcnt = hitcnt + 1
             Command1(2).Caption = "Find Next"
             Exit For
        End If
    Next X

    If hitcnt = 0 Then
        MsgBox "No Matches Found"
        Command1(2).Caption = "Search"
        location = 0
    End If

    Exit Sub



Mon, 14 Feb 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Usercontrol Text property not visible in property window

2. Display Text Property of a UserControl in the Property Window

3. Usercontrol Text property not visible in property window

4. VB6 Text property of UserControl does not work with UpDown Control's buddy property

5. Refer to text box's Text property

6. VB4 text box Align text property not working

7. VB4 text box Align text property not working

8. Setting properties on selected text in a text box

9. VB4-16bit Can't Make Text Control Text Property Empty

10. How to access the text property in a text object

11. Treeview control's property

12. What Happened to the Treeview.Nodes.Count Property?

 

 
Powered by phpBB® Forum Software