.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.lib.agw.supertooltip

.. currentmodule:: wx.lib.agw.supertooltip

.. highlight:: python



.. _wx.lib.agw.supertooltip:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.supertooltip**
==========================================================================================================================================

:class:`~wx.lib.agw.supertooltip.SuperToolTip` is a class that mimics the behaviour of :class:`TipWindow` and generic tooltip
windows, although it is a custom-drawn widget.


Description
===========

:class:`SuperToolTip` is a class that mimics the behaviour of :class:`TipWindow` and generic tooltip
windows, although it is a custom-drawn widget.

This class supports:

* Blended triple-gradient for the tooltip background;
* Header text and header image, with possibility to set the header font indipendently;
* Footer text and footer image, with possibility to set the footer font indipendently;
* Multiline text message in the tooltip body, plus an optional image as "body image";
* Bold lines and hyperlink lines in the tooltip body;
* A wide set of predefined drawing styles for the tooltip background;
* Drawing of separator lines after the header and/or before the footer;
* Rounded corners and shadows below the tooltip window (Windows XP only);
* Fade in/fade out effects (Windows XP only);
* User-settable delays for the delay after which the tooltip appears and the delay
  after which the tooltip is destroyed.

And a lot more. Check the demo for an almost complete review of the functionalities.


Usage
=====

Usage example::

    import wx
    import wx.lib.agw.supertooltip as STT

    class MyFrame(wx.Frame):

        def __init__(self, parent):

            wx.Frame.__init__(self, parent, -1, "SuperToolTip Demo")

            panel = wx.Panel(self)
            button = wx.Button(panel, -1, "I am the SuperToolTip target", pos=(100, 50))

            tip = STT.SuperToolTip("A nice tooltip message")

            tip.SetHeader("Hello World")
            tip.SetTarget(button)
            tip.SetDrawHeaderLine(True)

            tip.ApplyStyle("Office 2007 Blue")

            tip.SetDropShadow(True)


    # our normal wxApp-derived class, as usual

    app = wx.App(0)

    frame = MyFrame(None)
    app.SetTopWindow(frame)
    frame.Show()

    app.MainLoop()



Supported Platforms
===================

:class:`SuperToolTip` has been tested on the following platforms:
  * Windows (Windows XP).


Window Styles
=============

`No particular window styles are available for this class.`


Events Processing
=================

`No custom events are available for this class.`


License And Version
===================

:class:`SuperToolTip` is distributed under the wxPython license.

Latest Revision: Andrea Gavana @ 04 Feb 2013, 21.00 GMT

Version 0.5


|function_summary| Functions Summary
====================================

================================================================================ ================================================================================
:func:`~wx.lib.agw.supertooltip.ExtractLink`                                     Extract the link from an hyperlink line.
:func:`~wx.lib.agw.supertooltip.GetStyleKeys`                                    Returns the predefined styles keywords.
:func:`~wx.lib.agw.supertooltip.MakeBold`                                        Makes a font bold. Utility method.
================================================================================ ================================================================================


|


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
`~wx.lib.agw.supertooltip.SuperToolTip`                                          The main class for :class:`SuperToolTip`, which holds all the methods
`~wx.lib.agw.supertooltip.ToolTipWindow`                                         Popup window that works on wxMac.
`~wx.lib.agw.supertooltip.ToolTipWindowBase`                                     Base class for the different Windows and Mac implementation.
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.agw.supertooltip.SuperToolTip
   wx.lib.agw.supertooltip.ToolTipWindow
   wx.lib.agw.supertooltip.ToolTipWindowBase





Functions
------------

.. function:: ExtractLink(line)

   Extract the link from an hyperlink line.
   
   :param `line`: the line of text to be processed.


.. function:: GetStyleKeys()

   Returns the predefined styles keywords. 


.. function:: MakeBold(font)

   Makes a font bold. Utility method.
   
   :param `font`: the font to be made bold.