Mar-21-2018, 03:45 PM
What do you have so far?
Have you tried this? https://wiki.wxpython.org/VerySimpleDrawing
Have you tried this? https://wiki.wxpython.org/VerySimpleDrawing
Quote:import wx class DrawPanel(wx.Frame): """Draw a line to a panel.""" def __init__(self): wx.Frame.__init__(self, title="Draw on Panel") self.Bind(wx.EVT_PAINT, self.OnPaint) def OnPaint(self, event=None): dc = wx.PaintDC(self) dc.Clear() dc.SetPen(wx.Pen(wx.BLACK, 4)) dc.DrawLine(0, 0, 50, 50) app = wx.App(False) frame = DrawPanel() frame.Show() app.MainLoop()