效果:
代码:
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import wx
import wx.adv
import wx.xrc
class Dialog(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=wx.EmptyString, pos=wx.DefaultPosition,
size=wx.Size(400, 310), style=wx.DEFAULT_DIALOG_STYLE | wx.MINIMIZE_BOX)
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
bSizer1 = wx.BoxSizer(wx.VERTICAL)
self.m_staticText1 = wx.StaticText(self, wx.ID_ANY, u"距离00:00:00还剩:", wx.DefaultPosition, wx.DefaultSize, 0)
self.m_staticText1.Wrap(-1)
self.m_staticText1.SetFont(
wx.Font(20, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString))
bSizer1.Add(self.m_staticText1, 0, wx.ALL, 5)
self.m_staticText2 = wx.StaticText(self, wx.ID_ANY, u"00:00:00", wx.DefaultPosition, wx.DefaultSize,
wx.ALIGN_CENTER_HORIZONTAL | wx.ST_NO_AUTORESIZE)
self.m_staticText2.Wrap(-1)
self.m_staticText2.SetFont(
wx.Font(48, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString))
self.m_staticText2.SetForegroundColour