This project is read-only.

Tooltip

The Tooltip widget class allows you to easily add tooltip functionality in response to mouse events to an existing frame.

Inherited Classes: None
Implements Constructor: Yes
Implements Initializer: No
XML Templates: None
Fields: TooltipTitle, TooltipText
Hooks: None
Scripts: OnEnter, OnLeave

Methods

Construct(self, _, frame, title, text, children)


Description

Constructor override, applies the TooltipTitle, TooltipText fields as well as the default TooltipRefresh and TooltipLeave methods to the given frame. Can also optionally register named child elements of the frame for shared Tooltip functionality with the frame.

Arguments

self
The reference to the Tooltip widget class. Supplied automatically.

_
Unused argument, supplied automatically.

frame
The frame to apply Tooltip functionality to. This frame may already supply existing TooltipLeave and TooltipRefresh methods, and they will not be overwritten.

title
The title to be displayed on the Tooltip if the default methods remain, this should be a localization key as the conversion is done automatically.

text
The text to be displayed on the Tooltip if the default methods remain, this should be a localization key as the conversion is done automatically.

children
An optional table of child keys to also be registered for Tooltip functionality.

Returns

This function has no return value.

TooltipRefresh(self)


Description

Default function for when the Tooltip needs to be displayed or updated in response to a mouseover. It will create a tooltip and display the data in the TooltipTitle and TooltipText fields by default. You may override this function by defining it before passing your frame to the Tooltip constructor.

Arguments

self
The reference to the frame which has been constructed with the Tooltip class. Supplied automatically.

Returns

This function has no return value.

TooltipLeave(self)


Description

Default function for when the Tooltip needs to be hidden in response to the mouse leaving the frame. You may override this function by defining it before passing your frame to the Tooltip constructor.

Arguments

self
The reference to the frame which has been constructed with the Tooltip class. Supplied automatically.

Returns

This function has no return value.

Known Issues

There are currently no known issues.

Future Features

There are currently no planned future features.

Last edited May 2, 2011 at 8:16 PM by dyates92, version 2

Comments

No comments yet.