AdvancedSplash
tries to reproduce the behavior of SplashScreen
, with
some enhancements.
AdvancedSplash
tries to reproduce the behavior of SplashScreen
, but with
some enhancements (in my opinion).
AdvancedSplash
starts its construction from a simple frame. Then, depending on
the options passed to it, it sets the frame shape accordingly to the image passed
as input. AdvancedSplash
behaves somewhat like SplashScreen
, and almost
all the methods available in SplashScreen
are available also in
this module.
Sample usage:
import wx
import wx.lib.agw.advancedsplash as AS
app = wx.App(0)
frame = wx.Frame(None, -1, "AdvancedSplash Test")
imagePath = "my_splash_image.png"
bitmap = wx.Bitmap(imagePath, wx.BITMAP_TYPE_PNG)
shadow = wx.WHITE
splash = AS.AdvancedSplash(frame, bitmap=bitmap, timeout=5000,
agwStyle=AS.AS_TIMEOUT |
AS.AS_CENTER_ON_PARENT |
AS.AS_SHADOW_BITMAP,
shadowcolour=shadow)
app.MainLoop()
None of the options are strictly required (a part of the bitmap parameter).
If you use the defaults you get a very simple AdvancedSplash
.
AdvancedSplash
is customizable, and in particular you can set:
Whether you want to mask a colour or not in your input bitmap;
Where to center the splash screen (on screen, on parent or nowhere);
Whether it is a “timeout” splashscreen or not;
The time after which AdvancedSplash
is destroyed (if it is a timeout splashscreen);
The (optional) text you wish to display;
The font, colour and position of the displayed text (optional).
This class supports the following window styles:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x1 |
|
|
0x2 |
|
|
0x4 |
|
|
0x8 |
|
|
0x10 |
|
|
0x20 |
If the bitmap you pass as input has no transparency, you can choose one colour that will be masked in your bitmap. the final shape of |
No custom events are available for this class.
AdvancedSplash
control is distributed under the wxPython license.
Latest revision: Andrea Gavana @ 19 Dec 2012, 21.00 GMT
Version 0.5
|