I m developing a GUI using wxPython (Boa Constructor IDE). My GUI has the following:
- Rich text control
- Start button
- Stop Button
我的要求是,当我发布《裁武条约》季刊时,数字(1、2、3等)应开始在文字控制中印刷;当我发布《STOP》季刊时,应停止印刷。 《刑法》和《两性平等法》都显示了这一点。 为满足我的要求,我需要作哪些改动?
<><>Appearance:
http://www.ohchr.org。
import wx
import wx.richtext
def create(parent):
return Frame3(parent)
[wxID_FRAME3, wxID_FRAME3BUTTON1, wxID_FRAME3BUTTON2, wxID_FRAME3PANEL1,
wxID_FRAME3RICHTEXTCTRL1,
] = [wx.NewId() for _init_ctrls in range(5)]
class Frame3(wx.Frame):
def _init_ctrls(self, prnt):
# generated method, don t edit
wx.Frame.__init__(self, id=wxID_FRAME3, name= , parent=prnt,
pos=wx.Point(579, 234), size=wx.Size(414, 492),
style=wx.DEFAULT_FRAME_STYLE, title= Frame3 )
self.SetClientSize(wx.Size(406, 458))
self.panel1 = wx.Panel(id=wxID_FRAME3PANEL1, name= panel1 , parent=self,
pos=wx.Point(0, 0), size=wx.Size(406, 458),
style=wx.TAB_TRAVERSAL)
self.richTextCtrl1 = wx.richtext.RichTextCtrl(id=wxID_FRAME3RICHTEXTCTRL1,
parent=self.panel1, pos=wx.Point(96, 96), size=wx.Size(200, 100),
style=wx.richtext.RE_MULTILINE, value=u )
self.richTextCtrl1.SetLabel(u richText )
self.button2 = wx.Button(id=wxID_FRAME3BUTTON2, label=u STOP ,
name= button2 , parent=self.panel1, pos=wx.Point(256, 280),
size=wx.Size(75, 23), style=0)
self.button2.Bind(wx.EVT_BUTTON, self.OnButton2Button,
id=wxID_FRAME3BUTTON2)
self.button1 = wx.Button(id=wxID_FRAME3BUTTON1, label=u START ,
name= button1 , parent=self.panel1, pos=wx.Point(88, 280),
size=wx.Size(75, 23), style=0)
self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
id=wxID_FRAME3BUTTON1)
def __init__(self, parent):
self._init_ctrls(parent)
def OnButton1Button(self, event): #START BUTTON
event.Skip()
def OnButton2Button(self, event): #STOP BUTTON
event.Skip()
if __name__ == __main__ :
app = wx.PySimpleApp()
frame = create(None)
frame.Show()
app.MainLoop()