wx.lib.agw.supertooltip.SuperToolTip¶
The main class for SuperToolTip
, which holds all the methods
and setters/getters available to the user.
Class Hierarchy¶
Control Appearance¶
Methods Summary¶
Default class constructor. |
|
Applies none of the predefined styles. |
|
Dismiss the |
|
Create the |
|
Globally (application-wide) enables/disables |
|
Returns the main body bitmap used in |
|
Returns the bottom gradient colour. |
|
Returns whether the separator line before the footer is drawn or not. |
|
Returns whether the separator line after the header is drawn or not. |
|
Returns whether a shadow below |
|
Returns the delay time (in seconds) after which the |
|
Returns the footer text. |
|
Returns the footer bitmap. |
|
Returns the font used for the footer text. |
|
Returns the header text. |
|
Returns the header bitmap. |
|
Returns the font used for the header text. |
|
Returns the font used for the hyperlink text. |
|
Returns the main body message in |
|
Returns the font used in the main body message. |
|
Returns the middle gradient colour. |
|
Returns the tim delay (in seconds) after which the |
|
Returns the target window for |
|
Returns the text colour. |
|
Return the TipWindow, will return None if not yet created |
|
Returns the top gradient colour. |
|
Returns whether a fade in/fade out effect is used or not. |
|
Initializes the fonts for |
|
Returns |
|
Handles the |
|
The show time for |
|
The creation time has expired, create the |
|
Starts the |
|
Handles the |
|
Sets the main body bitmap for |
|
Sets the bottom gradient colour for |
|
Sets whether to draw a separator line before the footer or not. |
|
Sets whether to draw a separator line after the header or not. |
|
Whether to draw a shadow below |
|
Sets the delay time (in seconds) after which the |
|
Sets the footer text. |
|
Sets the footer bitmap for |
|
Sets the font for the footer text. |
|
Sets the header text. |
|
Sets the header bitmap for |
|
Sets the font for the header text. |
|
Sets the font for the hyperlink text. |
|
Sets the main body message for |
|
Sets the font for the main body message. |
|
Sets the middle gradient colour for |
|
Sets the time delay (in seconds) after which the |
|
Sets the target window for |
|
Sets the text colour for |
|
Sets the top gradient colour for |
|
Whether to use a fade in/fade out effect or not. |
|
Shows or hides the window. |
|
Calling this method immediately repaints the invalidated area of the window and all of its |
Class API¶
- class SuperToolTip(object)¶
The main class for
SuperToolTip
, which holds all the methods and setters/getters available to the user.
Methods¶
- __init__(self, message, bodyImage=wx.NullBitmap, header='', headerBmp=wx.NullBitmap, footer='', footerBmp=wx.NullBitmap)¶
Default class constructor.
- Parameters:
message – the main message in
SuperToolTip
body;bodyImage – the image in the
SuperToolTip
body;header – the header text;
headerBmp – the header bitmap;
footer – the footer text;
footerBmp – the footer bitmap.
- ApplyStyle(self, style)¶
Applies none of the predefined styles.
- Parameters:
style – one of the predefined styles available at the beginning of the module.
- DoHideNow(self)¶
Dismiss the
SuperToolTip
window immediately.Added in version 0.9.6.
- DoShowNow(self)¶
Create the
SuperToolTip
immediately.
- EnableTip(self, enable=True)¶
Globally (application-wide) enables/disables
SuperToolTip
.- Parameters:
enable –
True
to enableSuperToolTip
globally,False
otherwise.
- GetBodyImage(self)¶
Returns the main body bitmap used in
SuperToolTip
.
- GetBottomGradientColour(self)¶
Returns the bottom gradient colour.
Returns whether the separator line before the footer is drawn or not.
- GetDrawHeaderLine(self)¶
Returns whether the separator line after the header is drawn or not.
- GetDropShadow(self)¶
Returns whether a shadow below
SuperToolTip
is drawn or not.Note
This method is available only on Windows and requires Mark Hammond’s pywin32 package.
- GetEndDelay(self)¶
Returns the delay time (in seconds) after which the
SuperToolTip
is destroyed.
Returns the footer text.
Returns the footer bitmap.
Returns the font used for the footer text.
- GetHeader(self)¶
Returns the header text.
- GetHeaderBitmap(self)¶
Returns the header bitmap.
- GetHeaderFont(self)¶
Returns the font used for the header text.
- GetHyperlinkFont(self)¶
Returns the font used for the hyperlink text.
- GetMessage(self)¶
Returns the main body message in
SuperToolTip
.
- GetMessageFont(self)¶
Returns the font used in the main body message.
- GetMiddleGradientColour(self)¶
Returns the middle gradient colour.
- GetStartDelay(self)¶
Returns the tim delay (in seconds) after which the
SuperToolTip
is created.
- GetTarget(self)¶
Returns the target window for
SuperToolTip
.
- GetTextColour(self)¶
Returns the text colour.
- GetTipWindow(self)¶
Return the TipWindow, will return None if not yet created
- GetTopGradientColour(self)¶
Returns the top gradient colour.
- GetUseFade(self)¶
Returns whether a fade in/fade out effect is used or not.
Note
This method is available only on Windows and requires Mark Hammond’s pywin32 package.
- InitFont(self)¶
Initializes the fonts for
SuperToolTip
.
- IsEnabled(self)¶
Returns
True
whenSuperToolTip
is globally enabled,False
otherwise.Added in version 0.9.6.
- OnDestroy(self, event)¶
Handles the
SuperToolTip
target destruction.
- OnEndTimer(self)¶
The show time for
SuperToolTip
has expired, destroy theSuperToolTip
.
- OnStartTimer(self)¶
The creation time has expired, create the
SuperToolTip
.
- OnWidgetEnter(self, event)¶
Starts the
SuperToolTip
timer for creation, handles thewx.EVT_ENTER_WINDOW
event.- Parameters:
event – a
MouseEvent
event to be processed.
- OnWidgetLeave(self, event)¶
Handles the
wx.EVT_LEAVE_WINDOW
event for the target widgets.- Parameters:
event – a
MouseEvent
event to be processed.
- SetBodyImage(self, bmp)¶
Sets the main body bitmap for
SuperToolTip
.- Parameters:
bmp – the body bitmap, a valid
wx.Bitmap
object.
- SetBottomGradientColour(self, colour)¶
Sets the bottom gradient colour for
SuperToolTip
.- Parameters:
colour – the colour to use as bottom colour, a valid
wx.Colour
object.
Sets whether to draw a separator line before the footer or not.
- Parameters:
draw –
True
to draw a separator line before the footer,False
otherwise.
- SetDrawHeaderLine(self, draw)¶
Sets whether to draw a separator line after the header or not.
- Parameters:
draw –
True
to draw a separator line after the header,False
otherwise.
- SetDropShadow(self, drop)¶
Whether to draw a shadow below
SuperToolTip
or not.- Parameters:
drop –
True
to drop a shadow below the control,False
otherwise.
Note
This method is available only on Windows and requires Mark Hammond’s pywin32 package.
- SetEndDelay(self, delay=1e6)¶
Sets the delay time (in seconds) after which the
SuperToolTip
is destroyed.- Parameters:
delay – the delay in seconds.
Sets the footer text.
- Parameters:
footer – the footer text to display.
Sets the footer bitmap for
SuperToolTip
.- Parameters:
bmp – the footer bitmap, a valid
wx.Bitmap
object.
Sets the font for the footer text.
- Parameters:
font – the font to use for the footer text, a valid
wx.Font
object.
- SetHeader(self, header)¶
Sets the header text.
- Parameters:
header – the header text to display.
- SetHeaderBitmap(self, bmp)¶
Sets the header bitmap for
SuperToolTip
.- Parameters:
bmp – the header bitmap, a valid
wx.Bitmap
object.
- SetHeaderFont(self, font)¶
Sets the font for the header text.
- Parameters:
font – the font to use for the header text, a valid
wx.Font
object.
- SetHyperlinkFont(self, font)¶
Sets the font for the hyperlink text.
- Parameters:
font – the font to use for the hyperlink text, a valid
wx.Font
object.
- SetMessage(self, message)¶
Sets the main body message for
SuperToolTip
.- Parameters:
message – the message to display in the body.
- SetMessageFont(self, font)¶
Sets the font for the main body message.
- Parameters:
font – the font to use for the main body message, a valid
wx.Font
object.
- SetMiddleGradientColour(self, colour)¶
Sets the middle gradient colour for
SuperToolTip
.- Parameters:
colour – the colour to use as middle colour, a valid
wx.Colour
object.
- SetStartDelay(self, delay=1)¶
Sets the time delay (in seconds) after which the
SuperToolTip
is created.- Parameters:
delay – the delay in seconds.
- SetTarget(self, widget)¶
Sets the target window for
SuperToolTip
.- Parameters:
widget – the widget to which
SuperToolTip
is associated.
- SetTextColour(self, colour)¶
Sets the text colour for
SuperToolTip
.- Parameters:
colour – the colour to use as text colour, a valid
wx.Colour
object.
- SetTopGradientColour(self, colour)¶
Sets the top gradient colour for
SuperToolTip
.- Parameters:
colour – the colour to use as top colour, a valid
wx.Colour
object.
- SetUseFade(self, fade)¶
Whether to use a fade in/fade out effect or not.
- Parameters:
fade –
True
to use a fade in/fade out effect,False
otherwise.
Note
This method is available only on Windows and requires Mark Hammond’s pywin32 package.
- Show(self, show=True)¶
Shows or hides the window.
You may need to call Raise for a top level window if you want to bring it to top, although this is not needed if
Show
is called immediately after the frame creation.- Parameters:
show (bool) –
True
to show theSuperToolTip
window,False
to hide it.- Returns:
True
if the window has been shown or hidden orFalse
if nothing was done because it already was in the requested state.
Note
Notice that the default state of newly created top level windows is hidden (to allow you to create their contents without flicker) unlike for all the other, not derived from
TopLevelWindow
, windows that are by default created in the shown state.Added in version 0.9.5.
- Update(self)¶
Calling this method immediately repaints the invalidated area of the window and all of its children recursively (this normally only happens when the flow of control returns to the event loop).
Note
Notice that this function doesn’t invalidate any area of the window so nothing happens if nothing has been invalidated (i.e. marked as requiring a redraw). Use Refresh first if you want to immediately redraw the window unconditionally.
Added in version 0.9.5.