HeaderPane
Main
Hide
Share Link
Print

ShowToolTip Method, ToolTipClass Class

Displays a balloon-style tooltip.

Class: ToolTipClass
Namespace: Softelvdm.Controls
Assembly: Softelvdm.SftTreeNET

Syntax

public static void ShowToolTip(
    SoftelvdmUserControl control,
    Point locToolTip,
    ToolTipIcon icon,
    string title,
    string text,
    ArrowLocationEnum arrowLoc );
Public Shared Sub ShowToolTip(
    ByVal control As SoftelvdmUserControl,
    ByVal locToolTip As Point,
    ByVal icon As ToolTipIcon,
    ByVal title As String,
    ByVal text As String,
    ByVal arrowLoc As ArrowLocationEnum )

Parameters

control

The control owning the tooltip. Only .NET controls published by Softel vdm, Inc. can own and use tooltips offered by this method.

locToolTip

The location pointed at by the balloon's arrow, relative to the top, left corner of the control.

icon

The icon style.

title

The title string or an empty string to omit the title.

text

The single or multiline text to display.

arrowLoc

The location of the balloon's arrow.

Comments

Displays a balloon-style tooltip.

This tooltip can be used to bring information to the user's attention. It is unrelated to cell tooltips and scrolltips.

Examples

C#

                    } else {
                        if (loc.Y < sftTree1.ClientRectangle.Height / 2)
                            ArrowLoc = ArrowLocationEnum.TopRight;
                        else
                            ArrowLoc = ArrowLocationEnum.BottomLeft;
                    }
                }
            }
            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 &&

VB.NET

                If loc.Y < sftTree1.ClientRectangle.Height / 2 Then
                    ArrowLoc = ArrowLocationEnum.TopRight
                Else
                    ArrowLoc = ArrowLocationEnum.BottomLeft
                End If
            End If
        End If
    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 _

See Also ToolTipClass Class | Classes | SftTree/NET 3.0