-
Notifications
You must be signed in to change notification settings - Fork 0
/
entry.py
25 lines (19 loc) · 918 Bytes
/
entry.py
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
import wx
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar2Wx
from numpy import arange, sin, pi
class Entry(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
self.BACKGROUND_COLOUR = wx.Colour((180,180,180))
self.BACKGROUND_COLOUR = self.GetBackgroundColour()
self.CreateCtrls()
def Draw(self):
pass
def CreateCtrls(self):
png = wx.Image("startpage.png", wx.BITMAP_TYPE_ANY).ConvertToBitmap()
self.logo = wx.StaticBitmap(self, -1, png, (10, 5), (png.GetWidth(), png.GetHeight()))
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(self.logo, proportion=1, flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL, border=10)
self.SetSizerAndFit(sizer)