SetMargin Method



 
The SetMargin method sets the margin between border and text.


Syntax

    Tooltip.SetMargin(left, top, right, bottom)
Parameters
    left Long value that contains the left margin.
    top Long value that contains the top margin.
    right Long value that contains the right margin.
    bottom Long value that contains the bottom margin.
Return Value
    None.
Remarks
    None.
Examples
    The following example shows a tooltip when the mouse enters the text.

    <html>
    <body>
    <span id='mydiv' onMouseEnter='OnMouseEnter()'
    onMouseLeave='OnMouseLeave()' onMouseMove='OnMouseMove()'>
    Move the mouse over here.
    </span>
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    function OnMouseEnter()
    {
       myToolTip = SiteKiosk.SiteKioskUI.CreateToolTip();
       myToolTip.Balloon = true;
       myToolTip.NoAnimate = false;
       myToolTip.NoFade = false;
       myToolTip.NoPrefix = false;
       myToolTip.MaxWidth = 150;
       myToolTip.Title = "Title";
       myToolTip.Text = "This is the content";
       myToolTip.Icon = 1;
       myToolTip.CloseButton = true;     // Windows XP only
       myToolTip.SetMargin(5, 5, 5, 5);
       myToolTip.SetPosition(event.screenX, event.screenY);
       myToolTip.Show();
    }
    function OnMouseMove()
    {
       myToolTip.SetPosition(event.screenX, event.screenY);
    }
    function OnMouseLeave()
    {
       myToolTip.Hide();
    }
    </SCRIPT>
    </body>
    </html>
    

Applies to
    SiteKiosk v5.5 (and later versions).

Back to top