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
SuperToolTipbody;bodyImage – the image in the
SuperToolTipbody;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
SuperToolTipwindow immediately.Added in version 0.9.6.
- DoShowNow(self)¶
Create the
SuperToolTipimmediately.
- EnableTip(self, enable=True)¶
Globally (application-wide) enables/disables
SuperToolTip.- Parameters:
enable –
Trueto enableSuperToolTipglobally,Falseotherwise.
- 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
SuperToolTipis 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
SuperToolTipis 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
SuperToolTipis 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
TruewhenSuperToolTipis globally enabled,Falseotherwise.Added in version 0.9.6.
- OnDestroy(self, event)¶
Handles the
SuperToolTiptarget destruction.
- OnEndTimer(self)¶
The show time for
SuperToolTiphas expired, destroy theSuperToolTip.
- OnStartTimer(self)¶
The creation time has expired, create the
SuperToolTip.
- OnWidgetEnter(self, event)¶
Starts the
SuperToolTiptimer for creation, handles thewx.EVT_ENTER_WINDOWevent.- Parameters:
event – a
MouseEventevent to be processed.
- OnWidgetLeave(self, event)¶
Handles the
wx.EVT_LEAVE_WINDOWevent for the target widgets.- Parameters:
event – a
MouseEventevent to be processed.
- SetBodyImage(self, bmp)¶
Sets the main body bitmap for
SuperToolTip.- Parameters:
bmp – the body bitmap, a valid
wx.Bitmapobject.
- SetBottomGradientColour(self, colour)¶
Sets the bottom gradient colour for
SuperToolTip.- Parameters:
colour – the colour to use as bottom colour, a valid
wx.Colourobject.
Sets whether to draw a separator line before the footer or not.
- Parameters:
draw –
Trueto draw a separator line before the footer,Falseotherwise.
- SetDrawHeaderLine(self, draw)¶
Sets whether to draw a separator line after the header or not.
- Parameters:
draw –
Trueto draw a separator line after the header,Falseotherwise.
- SetDropShadow(self, drop)¶
Whether to draw a shadow below
SuperToolTipor not.- Parameters:
drop –
Trueto drop a shadow below the control,Falseotherwise.
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
SuperToolTipis 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.Bitmapobject.
Sets the font for the footer text.
- Parameters:
font – the font to use for the footer text, a valid
wx.Fontobject.
- 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.Bitmapobject.
- SetHeaderFont(self, font)¶
Sets the font for the header text.
- Parameters:
font – the font to use for the header text, a valid
wx.Fontobject.
- SetHyperlinkFont(self, font)¶
Sets the font for the hyperlink text.
- Parameters:
font – the font to use for the hyperlink text, a valid
wx.Fontobject.
- 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.Fontobject.
- SetMiddleGradientColour(self, colour)¶
Sets the middle gradient colour for
SuperToolTip.- Parameters:
colour – the colour to use as middle colour, a valid
wx.Colourobject.
- SetStartDelay(self, delay=1)¶
Sets the time delay (in seconds) after which the
SuperToolTipis created.- Parameters:
delay – the delay in seconds.
- SetTarget(self, widget)¶
Sets the target window for
SuperToolTip.- Parameters:
widget – the widget to which
SuperToolTipis associated.
- SetTextColour(self, colour)¶
Sets the text colour for
SuperToolTip.- Parameters:
colour – the colour to use as text colour, a valid
wx.Colourobject.
- SetTopGradientColour(self, colour)¶
Sets the top gradient colour for
SuperToolTip.- Parameters:
colour – the colour to use as top colour, a valid
wx.Colourobject.
- SetUseFade(self, fade)¶
Whether to use a fade in/fade out effect or not.
- Parameters:
fade –
Trueto use a fade in/fade out effect,Falseotherwise.
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
Showis called immediately after the frame creation.- Parameters:
show (bool) –
Trueto show theSuperToolTipwindow,Falseto hide it.- Returns:
Trueif the window has been shown or hidden orFalseif 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.