Results 1 to 3 of 3

Thread: 2 Qs: TreeView, Transparent Blitting

  1. #1
    Guest

    Talking 2 Qs: TreeView, Transparent Blitting

    I have 2 questions:

    One:
    In a TreeView control, there doesn't seem to be an 'ItemDblClick' event.
    There is an 'ItemClick' event and a 'DblClick' event, but how do I find out if a user double clicked on an item? I tried combining ItemClick and DblClick with no success

    Two:
    Is there a way to blit with a specified transparent color?

    If possible, please supply code.
    Thanks.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Here is a little example:
    Code:
    Private m_nodSelected As Node
    
    Private Sub Form_Load()
        Dim i As Integer
        Dim j As Integer
        Dim nodParent As Node
        
        With TreeView1
            For i = 1 To 5
                Set nodParent = .Nodes.Add(, , "Parent" & i, "Parent" & i)
                For j = 1 To 10
                    .Nodes.Add nodParent, tvwChild, "Child" & i & j, "Child" & i & j
                Next
            Next
        End With
    End Sub
    
    
    Private Sub TreeView1_DblClick()
        If m_nodSelected Is Nothing Then
            MsgBox "Nothing is selected."
        Else
            MsgBox m_nodSelected.Text
        End If
    End Sub
    
    Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
        Set m_nodSelected = TreeView1.HitTest(x, y)
    End Sub

  3. #3
    Guest
    Thanks Serge

    Does anybody know the answer to the second question?

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