dc.SetPen(wx.Pen(wx.BLACK, 0))
dc.SetBrush(wx.Brush("C0C0C0"))
dc.DrawRectangle(50,50,50,50)
This is my best attempt at drawing a 50x50, gray box with no border. However, setting the pen width to 0 doesn't seem to accomplish anything, and setting the brush only changes the fill from pure white to pure black.
Here's it in the context of a panel, in case it's part of the problem:
class DrawRect(wx.Panel):
def __init__(self,parent=None,id=-1,pos=(-1,-1),size=(-1,-1),style=0):
wx.Panel.__init__(self,parent,id,size,pos,style)
self.SetBackgroundColour("#D18B47")
self.Bind(wx.EVT_PAINT,self.onPaint)
def onPaint(self, event):
event.Skip()
dc = wx.PaintDC(event.GetEventObject())
self.drawRect(dc)
def drawRect(self,dc):
dc.SetPen(wx.Pen("FFCE8A", 0))
dc.SetBrush(wx.Brush("C0C0C0"))
dc.DrawRectangle(50,50,50,50)