phoenix_title wx.lib.agw.supertooltip

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

Description

SuperToolTip is a class that mimics the behaviour of 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 independently;

  • Footer text and footer image, with possibility to set the footer font independently;

  • 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

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

SuperToolTip is distributed under the wxPython license.

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

Version 0.5

function_summary Functions Summary

ExtractLink

Extract the link from an hyperlink line.

GetStyleKeys

Returns the predefined styles keywords.

MakeBold

Makes a font bold. Utility method.


class_summary Classes Summary

SuperToolTip

The main class for SuperToolTip, which holds all the methods

ToolTipWindow

A simple PopupWindow that holds fancy tooltips.

ToolTipWindowBase

Base class for the different Windows and Mac implementation.


Functions



Extract the link from an hyperlink line.

Parameters:

line – the line of text to be processed.



GetStyleKeys()

Returns the predefined styles keywords.



MakeBold(font)

Makes a font bold. Utility method.

Parameters:

font – the font to be made bold.