Results 1 to 3 of 3

Thread: Small Problem with tree view

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    chennai,tamilnadu,india
    Posts
    29

    Post

    Hi,

    I have got a treeeview and a sstab ctrl.
    Now i click a node in the trv and move the focus to sstab ctrl.Highlight on the node is deselected as focus is shifted.

    Now i want the selected node to be highlighted as the focus is shifted.

    pl help
    Thanx
    Murali

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    If you know the Index of the Node you want to highlight, then it is very easy:

    TreeView1.Nodes(2).Selected = True

    ------------------

    Serge

    Senior Programmer Analyst
    sdymkov@microage.com
    Access8484@aol.com
    ICQ#: 51055819

  3. #3
    Member
    Join Date
    Jan 1999
    Location
    Garden Grove, CA, Orange
    Posts
    55

    Post

    Right mouse click on the TreeView control, and select properties menu.
    Uncheck the HideSelection option.
    This makes selected node dimmed after the treeview lost focus.
    You can see which node has selected after the TreeView lost its focus.

    Or you can change ForeColor of node
    ===========================================
    Private Sub tvModel_NodeClick(ByVal Node As MSComctlLib.Node)
    Dim i As Integer

    For i = 1 To tvModel.Nodes.Count
    tvModel.Nodes(i).ForeColor = vbBlack
    Next

    Node.ForeColor = vbRed
    End Sub
    ===========================================

    Joon

Posting Permissions

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



Click Here to Expand Forum to Full Width