1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#(c)www.stani.be
import _spe.info
INFO=_spe.info.copy()
INFO['description']=\
"""General spe dialog, showing the logo on top and displaying the text in a
customized wxHtmlwindow, so that the links are opened in an external webbrowser."""
__doc__=INFO['doc']%INFO
#_______________________________________________________________________________
import os,webbrowser
import wx
import sm.wxp
def create(parent,message,path):
dlg= wxDialog1(parent,message,path)
dlg.ShowModal()
[wxID_WXDIALOG1] = map(lambda _init_ctrls: wx.NewId(), range(1))
class wxDialog1(wx.Dialog):
def _init_utils(self):
# generated method, don't edit
pass
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_WXDIALOG1, name='', parent=prnt,
pos=wx.Point(25, 31), size=wx.Size(488, 588),
style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX,
title='Spe')
self._init_utils()
self.SetClientSize(wx.Size(480, 554))
def __init__(self, parent,message,path=''):
self._init_ctrls(parent)
self.SetBackgroundColour(wx.Colour(0, 0, 0))
self.staticBitmap1 = wx.StaticBitmap(
bitmap=wx.Bitmap(os.path.join(path,'images','spe_about.jpg'),
wx.BITMAP_TYPE_JPEG), id=-1,
name='staticBitmap1', parent=self, pos=wx.Point(0, 0),
size=wx.Size(480, 100), style=0)
self.text = sm.wxp.HtmlWindow(id=-1, name='text',
parent=self, pos=wx.Point(0, 0), size=wx.Size(480, 339))
self.text.SetPage('<font face=arial>%s</font>'%message)
self.init_sizers()
def init_sizers(self):
"""Stretch the listbox."""
self.box1=wx.BoxSizer(wx.VERTICAL)
self.box1.Add(self.staticBitmap1,0,0,0)
self.box1.Add(self.text, 1, wx.ALL|wx.EXPAND, 0)
self.SetAutoLayout(1)
self.SetSizer(self.box1)
|