def _create_control(self, parent): # Get the splash screen image. image = self.image.create_image() splash_screen = wx.SplashScreen( # The bitmap to display on the splash screen. image.ConvertToBitmap(), # Splash Style. wx.SPLASH_NO_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN, # Timeout in milliseconds (we don't currently timeout!). 0, # The parent of the splash screen. parent, # wx Id. -1, # Window style. style=wx.SIMPLE_BORDER | wx.FRAME_NO_TASKBAR) # By default we create a font slightly bigger and slightly more italic # than the normal system font ;^) The font is used inside the event # handler for 'EVT_PAINT'. self._wx_default_text_font = new_font_like( wx.NORMAL_FONT, point_size=wx.NORMAL_FONT.GetPointSize() + 1, style=wx.ITALIC) # This allows us to write status text on the splash screen. wx.EVT_PAINT(splash_screen, self._on_paint) return splash_screen
def _create_control(self, parent): # Get the splash screen image. image = self.image.create_image() splash_screen = wx.SplashScreen( # The bitmap to display on the splash screen. image.ConvertToBitmap(), # Splash Style. wx.SPLASH_NO_TIMEOUT | wx.SPLASH_CENTRE_ON_SCREEN, # Timeout in milliseconds (we don't currently timeout!). 0, # The parent of the splash screen. parent, # wx Id. -1, # Window style. style = wx.SIMPLE_BORDER | wx.FRAME_NO_TASKBAR ) # By default we create a font slightly bigger and slightly more italic # than the normal system font ;^) The font is used inside the event # handler for 'EVT_PAINT'. self._wx_default_text_font = new_font_like( wx.NORMAL_FONT, point_size = wx.NORMAL_FONT.GetPointSize() + 1, style = wx.ITALIC ) # This allows us to write status text on the splash screen. wx.EVT_PAINT(splash_screen, self._on_paint) return splash_screen
def _create_control(self, parent): """ Create the toolkit-specific control that represents the widget. """ # The background image (it is tiled). image = self.image.create_image() self._bmp = image.ConvertToBitmap() sizer = wx.BoxSizer(wx.VERTICAL) panel = wx.Panel(parent, -1, style=wx.CLIP_CHILDREN | wx.SIMPLE_BORDER) panel.SetSizer(sizer) panel.SetAutoLayout(True) # Create a suitable font. self._font = new_font_like(wx.NORMAL_FONT, family=wx.SWISS) width, height = self._get_preferred_size(self.text, self._font) panel.SetMinSize((width, height)) wx.EVT_PAINT(panel, self._on_paint_background) wx.EVT_ERASE_BACKGROUND(panel, self._on_erase_background) return panel