HeaderPane
Main
Hide
Share Link
Print

VisibleIndex Property, ItemClass Class

Returns the index of the item.

Class: ItemClass
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public int VisibleIndex { get; }
Public ReadOnly Property VisibleIndex As Integer

Value

The index of the item or -1 if this item is not visible.

Comments

Returns the index of the item.

This is normally only used internally by the control. A visible item count is used with scrolling operations. Scroll bar ranges are based on visible items only.

Examples

C#

            }
            ToolTipClass.ShowToolTip(sftTree1, loc, ttIcon, title, text, ArrowLoc);
        }

        private void sftTree1_ItemClick(object sender, ItemClickEventArgs e) {
            if (e.Item != null && e.Cell != null) {
                if (e.Item.UsageLocation == UsageLocationEnum.footer &&
                        e.Area == ItemClickAreaEnum.Cell &&
                        e.Item.VisibleIndex == 0 && e.Cell.ColumnIndex == 2 &&
                        e.Part is ButtonPartClass) {
                    try {
                        System.Diagnostics.Process.Start("http://www.softelvdm.com/treenet.html");
                    } catch {
                    }
                }
            }

VB.NET

    End If
    ToolTipClass.ShowToolTip(sftTree1, loc, ttIcon, title, text, ArrowLoc)
End Sub

Private Sub sftTree1_ItemClick(ByVal sender As System.Object, ByVal e As Softelvdm.SftTreeNET.ItemClickEventArgs) Handles sftTree1.ItemClick
  If Not e.Item Is Nothing And Not e.Cell Is Nothing Then
    If e.Item.UsageLocation = UsageLocationEnum.footer And _
        e.Area = ItemClickAreaEnum.Cell And _
        e.Item.VisibleIndex = 0 And e.Cell.ColumnIndex = 2 And _
        TypeOf e.Part Is ButtonPartClass Then

        Try
            System.Diagnostics.Process.Start("http://www.softelvdm.com/treenet.html")
        Catch ex As Exception

        End Try

See Also ItemClass Class | Classes | SftTree/NET 3.0