ToasterBox is a cross-platform widget to make the creation of MSN style “toaster” popups easier.
Default class constructor. |
|
Adds a panel to the |
|
Centres the window on its parent (if any). If the |
|
Centres the |
|
Cleans the window list, erasing the stack of |
|
Returns the |
|
Returns whether |
|
If a |
|
It’s time to hide a |
|
Handles the |
|
Creates the |
|
Sets the |
|
Sets the |
|
Sets the time after which the |
|
Sets the |
|
Sets the |
|
Sets the |
|
Sets the |
|
Sets the |
|
Sets the |
|
Sets the |
|
Sets the |
|
If focus is |
ToasterBox is a cross-platform widget to make the creation of MSN style “toaster” popups easier.
Default class constructor.
parent – the window parent;
tbstyle –
the ToasterBox
main style. Can be one of the following
bits:
|
Value |
Description |
---|---|---|
|
0x1 |
A simple |
|
0x2 |
ToasterBoxes with different degree of complexity can be created. You can add as many controls as you want, provided that you call the |
windowstyle –
this parameter influences the visual appearance of
ToasterBox
, and can be one of the following styles:
Window Style |
Hex Value |
Description |
---|---|---|
|
0x2008002 |
Default window style for |
|
0x22009806 |
|
closingstyle –
the closing style for ToasterBox
. Can be one of the
following bits:
Closing Styles |
Hex Value |
Description |
---|---|---|
|
0x1 |
|
|
0x2 |
|
scrollType –
the scrolling direction for ToasterBox
. Can be one of the
following bits:
Scroll Styles |
Hex Value |
Description |
---|---|---|
|
0x1 |
|
|
0x2 |
|
|
0x4 |
|
Adds a panel to the ToasterBox
.
panel – an instance of wx.Window
.
Note
Use this method only for a ToasterBox
created with the TB_COMPLEX
style.
Centres the window on its parent (if any). If the ToasterBox
parent is None
,
it calls CenterOnScreen
.
direction – specifies the direction for the centering. May be wx.HORIZONTAL
,
wx.VERTICAL
or wx.BOTH
.
Note
This methods provides for a way to center ToasterBox
over their parents instead of the
entire screen. If there is no parent, then behaviour is the same as CenterOnScreen
.
See also
Centres the ToasterBox
on screen.
direction – specifies the direction for the centering. May be wx.HORIZONTAL
,
wx.VERTICAL
or wx.BOTH
.
See also
Cleans the window list, erasing the stack of ToasterBox
objects.
Returns the ToasterBox
frame.
Returns whether ToasterBox
will steal the focus from the parent application.
If a ToasterBox
already exists, move the new one above the existing one.
tb – another instance of ToasterBox
.
It’s time to hide a ToasterBox
.
Handles the wx.EVT_TIMER
event for ToasterBox
, moving the new window
on top of the last one created.
event – a TimerEvent
event to be processed.
Creates the ToasterBoxWindow
, that does all the job.
Sets the ToasterBox
background colour.
colour – a valid wx.Colour
object. If defaulted to None
, then
the background colour will be white.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
Sets the ToasterBox
background image.
bitmap – a valid wx.Bitmap
object or filename. If defaulted
to None
, then no background bitmap is used.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
Sets the time after which the ToasterBox
is destroyed (linger).
pausetime – the delay after which the control is destroyed, in seconds.
Sets the ToasterBox
position on screen.
pos – the widget position, an instance of wx.Point
.
Sets the ToasterBox
position on screen, at one of the screen corners.
pos – an integer specifying the screen corner, namely:
Corner Number |
Position |
---|---|
0 |
Top left screen corner |
1 |
Top right screen corner |
2 |
Bottom left screen corner |
3 |
Bottom right screen corner |
Sets the ToasterBox
scroll speed.
speed – it is the pause time (in milliseconds) for every step in the ScrollUp method.
Sets the ToasterBox
size.
size – the new control size, an instance of wx.Size
.
Sets the ToasterBox
text label.
text – the widget label.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
Sets the ToasterBox
foreground colour.
colour – a valid wx.Colour
object. If defaulted to None
, then
the background colour will be black.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
Sets the ToasterBox
text font.
colour – a valid wx.Colour
object. If defaulted to None
, then
a simple generic font will be generated.
Note
Use this method only for a ToasterBox
created with the TB_SIMPLE
style.
Sets the ToasterBox
title if it was created with TB_CAPTION
window style.
title – the ToasterBox
caption title.
If focus is True
, Instructs ToasterBox
to steal the focus from the
parent application, otherwise it returns the focus to the original owner.
focus – True
to set the focus on ToasterBox
, False
to
return it to the original owner.