.. include:: headings.inc .. module:: lib.agw.supertooltip .. currentmodule:: lib.agw.supertooltip .. highlight:: python .. _lib.agw.supertooltip: ========================================================================================================================================== |phoenix_title| **supertooltip** ========================================================================================================================================== :class:`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 @ 20 Mar 2012, 21.00 GMT Version 0.5 | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for module **supertooltip** .. raw:: html

Inheritance diagram of supertooltip

| |function_summary| Functions Summary ==================================== ================================================================================ ================================================================================ :func:`~lib.agw.supertooltip.ExtractLink` Extract the link from an hyperlink line. :func:`~lib.agw.supertooltip.GetStyleKeys` Returns the predefined styles keywords. :func:`~lib.agw.supertooltip.MakeBold` Makes a font bold. Utility method. ================================================================================ ================================================================================ | |class_summary| Classes Summary =============================== ================================================================================ ================================================================================ :ref:`lib.agw.supertooltip.SuperToolTip` The main class for :class:`SuperToolTip`, which holds all the methods :ref:`lib.agw.supertooltip.ToolTipWindow` A simple :class:`PopupWindow` that holds fancy tooltips. :ref:`lib.agw.supertooltip.ToolTipWindowBase` Base class for the different Windows and Mac implementation. ================================================================================ ================================================================================ | .. toctree:: :maxdepth: 1 :hidden: lib.agw.supertooltip.SuperToolTip lib.agw.supertooltip.ToolTipWindow 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.