Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

ToolTipVScroll Event, SftTree Object

A ScrollTip is about to be displayed.

Syntax

VB.NETPrivate Sub object_ToolTipVScroll(ByVal sender As Object, ByVal e As EventArgumentType) Handles object.ToolTipVScroll
VBPrivate Sub object_ToolTipVScroll(Text As String, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
C#.NETvoid object_ToolTipVScroll(object sender, EventArgumentType e);
VC++void OnToolTipVScrollobject(_bstr_t* Text, long ItemIndex, short ColIndex);
CHRESULT OnToolTipVScrollobject(BSTR* Text, long ItemIndex, short ColIndex);

object

A SftTree object.

Text

The default Scroll Tip text. The application can override the default text by assigning a new string to the Text parameter. This string is displayed as the Tool Tip instead. If Text is set to an empty string, no Tool Tip is displayed. A maximum string length of 1000 characters is supported.

ItemIndex

The zero-based index of the first item currently displayed in the tree control client area (see Items.TopIndex).

ColIndex

The zero-based column number of the first column displayed.

Comments

The ToolTipVScroll event occurs when a ScrollTip is about to be displayed.

The ToolTipVScroll event occurs when the user scrolls the tree control contents vertically by dragging the vertical scroll bar's scroll box using the mouse.

Examples

VB.NET

            If Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo Then
                Img.Appearance = SftPictureImageConstants.sftImageCheckboxYes
            ElseIf Img.Appearance = SftPictureImageConstants.sftImageCheckboxYes Then
                Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo
            End If
        End If
    End Sub

    Private Sub AxSftTree1_ToolTipVScroll(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ToolTipVScrollEvent) Handles AxSftTree1.ToolTipVScroll
        e.text = "Item " & e.itemIndex & " - " & e.text
    End Sub

    Private Sub AxSftTree1_EditAllowed(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_EditAllowedEvent) Handles AxSftTree1.EditAllowed
        ' Last chance to suppress cell editing for a cell
        'If e.itemIndex = 1 And e.colIndex = 1 Then
        '    e.allowed = False

VB6

        If Img.Appearance = sftImageCheckboxNo Then
            Img.Appearance = sftImageCheckboxYes
        ElseIf Img.Appearance = sftImageCheckboxYes Then
            Img.Appearance = sftImageCheckboxNo
        End If
    End If
End Sub

Private Sub SftTree1_ToolTipVScroll(Text As String, ByVal ItemIndex As Long, ByVal ColIndex As Integer)
    Text = "Item " & ItemIndex & " - " & Text
End Sub

Private Sub SftTree1_EditAllowed(ByVal ItemIndex As Long, ByVal ColIndex As Integer, Allowed As Boolean)
    ' Last chance to suppress cell editing for a cell
    'If ItemIndex = 1 And ColIndex = 1 Then
    '    Allowed = False

C#

                Img = axSftTree1.get_Cell(e.itemIndex, e.colIndex).Image;
                if (Img.Appearance == SftPictureImageConstants.sftImageCheckboxNo)
                    Img.Appearance = SftPictureImageConstants.sftImageCheckboxYes;
                else if (Img.Appearance == SftPictureImageConstants.sftImageCheckboxYes)
                    Img.Appearance = SftPictureImageConstants.sftImageCheckboxNo;
            }
        }

        private void axSftTree1_ToolTipVScroll(object sender, AxSftTreeLib75._DSftTreeEvents_ToolTipVScrollEvent e) {
            e.text = "Item " + e.itemIndex.ToString() + " - " + e.text;
        }

        private void axSftTree1_EditAllowed(object sender, AxSftTreeLib75._DSftTreeEvents_EditAllowedEvent e) {
            // Last chance to suppress cell editing for a cell
            //if (e.itemIndex == 1 && e.colIndex == 1)
            //    e.allowed = false;

C++

        pImg = m_vTree->Cell[ItemIndex][ColIndex]->Image;
        if (pImg->Appearance == sftImageCheckboxNo)
            pImg->Appearance = sftImageCheckboxYes;
        else if (pImg->Appearance == sftImageCheckboxYes)
            pImg->Appearance = sftImageCheckboxNo;
    }
}

void CCellEditingDlg::OnToolTipVScrollSftTree1(BSTR FAR* Text, long ItemIndex, short ColIndex)
{
    CString str;
    str.Format(_T("Item %ld - %s"), ItemIndex, (LPCTSTR)CString(*Text));
    *Text = str.AllocSysString();
}

void CCellEditingDlg::OnEditAllowedSftTree1(long ItemIndex, short ColIndex, BOOL FAR* Allowed)

See Also SftTree Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.