Type | Description | |||
ToolTip as String |
The ToolTip parameter can be any of the following:
| |||
Title as Variant |
The Title parameter can be any of the following:
| |||
Alignment as Variant |
A long expression that indicates the alignment of the tooltip relative to the
position of the cursor. If missing (VT_EMPTY, VT_ERROR) the alignment of the
tooltip for the object being hovered is not changed.
The Alignment parameter can be one of the following:
By default, the tooltip is aligned relative to the top-left corner (0 - exTopLeft). | |||
X as Variant |
Specifies the horizontal position to display the tooltip as one of the
following:
| |||
Y as Variant |
Specifies the vertical position to display the tooltip as one of the following:
|
For instance:
The ToolTip parameter supports the built-in HTML format like follows:
The control supports expandable HTML captions feature which allows you to expand(show)/collapse(hide) different information using <a ;exp=> or <a ;e64=> anchor tags. The exp/e64 field of the anchor stores the HTML line/lines to show once the user clicks/collapses/expands the caption.
Any ex-HTML caption can be transformed to an expandable-caption, by inserting the anchor ex-HTML tag. For instance, <solidline><b>Header</b></solidline><br>Line1<r><a ;exp=show lines>+</a><br>Line2<br>Line3 shows the Header in underlined and bold on the first line and Line1, Line2, Line3 on the rest. The show lines is shown instead of Line1, Line2, Line3 once the user clicks the + sign.
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
The following VB sample displays ( as tooltip ) the identifier of the anchor element from the cursor:
Private Sub G2antt1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) With G2antt1 .ShowToolTip .AnchorFromPoint(-1, -1) End With End Sub
The following VB.NET sample displays ( as tooltip ) the identifier of the anchor element from the cursor:
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent With AxG2antt1 .ShowToolTip(.get_AnchorFromPoint(-1, -1)) End With End Sub
The following C# sample displays ( as tooltip ) the identifier of the anchor element from the cursor:
private void axG2antt1_MouseMoveEvent(object sender, AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent e) { axG2antt1.ShowToolTip(axG2antt1.get_AnchorFromPoint(-1, -1)); }
The following C++ sample displays ( as tooltip ) the identifier of the anchor element from the cursor:
void OnMouseMoveG2antt1(short Button, short Shift, long X, long Y) { COleVariant vtEmpty; V_VT( &vtEmpty ) = VT_ERROR; m_g2antt.ShowToolTip( m_g2antt.GetAnchorFromPoint( -1, -1 ), vtEmpty, vtEmpty, vtEmpty ); }
The following VFP sample displays ( as tooltip ) the identifier of the anchor element from the cursor:
*** ActiveX Control Event *** LPARAMETERS button, shift, x, y with thisform With .G2antt1 .ShowToolTip(.AnchorFromPoint(-1, -1)) EndWith endwith