本文主要是介绍wxPython Demo:简易倒计时,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
效果:
代码:
# -*- coding: utf-8 -*-# -*- coding: utf-8 -*-import wx
import wx.adv
import wx.xrcclass 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(
这篇关于wxPython Demo:简易倒计时的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!