HeaderPane
Main
Hide

SftTree/OCX 8.0 - ActiveX Tree Control

Share Link
Print

Click Event, SftTree Object

The selection changes.

Deprecated - Provided for compatibility with earlier versions only - Use the SelectionChange event instead

Syntax

VB.NETPrivate Sub object_ClickEvent(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ClickEvent
VBPrivate Sub object_Click()
C#.NETvoid object_ClickEvent(object sender, EventArgumentType e);
VC++void OnClickobject();
CHRESULT OnClickobject();

object

A SftTree object.

Comments

Deprecated - Provided for compatibility with earlier versions only - Use the SelectionChange event instead

The Click event occurs when the selection changes.

The Click event is not limited to mouse events as the selection can change through keyboard input also. To determine which mouse button was pressed and/or in which area of the tree control the mouse button was pressed, use the MouseDown or ItemClick events.

The Items.SelectionArea property can be used to control the areas that cause a selection change.

Examples

VB.NET

    Private Sub MenuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuExit.Click
        Application.Exit()
    End Sub

    Private Sub CopyImageFromCurrentItem()

        Dim ItemIndex As Integer
        Dim Img As SftPictureObject

        ItemIndex = AxSftTree1.Items.Current
        If ItemIndex < 0 Then Exit Sub

        ' don't use images that are too large in the other areas
        Img = AxSftTree1.get_Cell(ItemIndex, 0).Image
        If Img.ActualHeight <= 20 And Img.ActualWidth <= 20 Then
            AxSftTree1.RowColumnHeader.Image = Img

VB6

      ScaleHeight     =   975
      ScaleWidth      =   3975
      TabIndex        =   2
      Top             =   5400
      Visible         =   0   'False
      Width           =   3975
   End
   Begin VB.Label Label2 
      Caption         =   "Click on the SftTree/OCX control above and hit F1 to access online help for SftTree/OCX 8.0"
      BeginProperty Font 
         Name            =   "Microsoft Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False

See Also SftTree Object | Object Hierarchy


Last Updated 05/24/2026 - (email)
© 2026 Softel vdm, Inc.