AdvancedSplash tries to reproduce the behavior of wx.SplashScreen, with some enhancements.
AdvancedSplash tries to reproduce the behavior of wx.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 wx.SplashScreen, and almost all the methods available in wx.SplashScreen are available also in this module.
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()
This code snippet can be downloaded, see this example script.
Some of the AGW snippets of code in the documentation use images and external files (to create bitmaps or access external data). As these files are not provided in these snippets, you should make the approriate modifications to the code to actually run it.
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:
This class supports the following window styles:
|Window Styles||Hex Value||Description|
|AS_TIMEOUT||0x1||AdvancedSplash will be destroyed after timeout milliseconds.|
|AS_NOTIMEOUT||0x2||AdvancedSplash can be destroyed by clicking on it, pressing a key or by explicitly call the Close() method.|
|AS_CENTER_ON_SCREEN||0x4||AdvancedSplash will be centered on screen.|
|AS_CENTER_ON_PARENT||0x8||AdvancedSplash will be centered on parent.|
|AS_NO_CENTER||0x10||AdvancedSplash will not be centered.|
|AS_SHADOW_BITMAP||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 AdvancedSplash will be defined only by non-transparent (non-masked) pixels.|
No custom events are available for this class.
AdvancedSplash control is distributed under the wxPython license.
Latest revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT
Module author: Andrea Gavana <firstname.lastname@example.org>
Inheritance diagram for module: advancedsplash
A graphical representation of the SVN commits in the last year.
Click on any date in the picture to jump to that particular revision page, containing information about committers, log messages and SVN diffs.
No issues have been detected by 2to3.py.