【发布时间】:2015-03-02 14:43:35
【问题描述】:
您好,我想在框架的中心画一个圆圈。 有没有像 wx.Align_Center 这样的东西我可以和 wx.DrawCircle 一起使用下面是我的代码。
#!/usr/bin/python
# points.py
import wx
import random
class Points(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(250, 150))
self.Bind(wx.EVT_PAINT, self.OnPaint)
self.Centre()
self.Show(True)
def OnPaint(self, event):
dc = wx.PaintDC(self)
dc.SetBrush(wx.Brush('RED'))
dc.DrawCircle(20,20)
app = wx.App()
Points(None, -1, 'Test')
app.MainLoop()
【问题讨论】:
标签: python python-2.7 wxpython wxwidgets