title: Using wxPython SpeedMeter within a panel
body: <p>Okay.
   So I have spent about 30 minutes trying to get this question and code formatted correctly. And I get a -1. That's not helpful<br>
  I started with the wxDemo code, copied it to a new project in PyCharm and it worked when only in the frame.
  Then I copied the SpeedMeter code to an existing project that uses a Frame and many panels.
  All I can get to show is a small black rectangle. Can someone suggest anything I can try to get the full sized meter to display?</p>
  
  <p>Can't get SpeedMeter to work in a Panel</p>
  
  <pre><code>import wx  
  import wx.lib.inspection  
  import wx.lib.buttons  
  from math import pi  
  try:  
      from agw import speedmeter as SM  
  except ImportError:  
      import wx.lib.agw.speedmeter as SM  
  class PanelOne(wx.Panel):  
      def __init__(self, parent):  
          wx.Panel.__init__(self, parent=parent)  
          panel = wx.Panel(self, wx.ID_ANY)  
          sizer = wx.FlexGridSizer(1, 1, 5, 5) # FlexGridSizer(rows, cols, vgap, hgap)  
          panel1 = wx.Panel(panel, wx.ID_ANY, style=wx.SUNKEN_BORDER)  
  
          speed = SM.SpeedMeter(panel1, agwStyle=SM.SM_DRAW_HAND|SM.SM_DRAW_SECTORS|SM.SM_DRAW_MIDDLE_TEXT|SM.SM_DRAW_SECONDARY_TICKS)  
  
      speed.SetAngleRange(-pi/6, 7*pi/6)  
      intervals = range(0, 201, 20)  
      speed.SetIntervals(intervals)  
      colours = [wx.BLACK]*10  
      speed.SetIntervalColours(colours)  
      ticks = [str(interval) for interval in intervals]  
      speed.SetTicks(ticks)  
      speed.SetTicksColour(wx.WHITE)  
      speed.SetNumberOfSecondaryTicks(5)  
      speed.SetTicksFont(wx.Font(7, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))  
      speed.SetMiddleText("Volts")  
      speed.SetMiddleTextColour(wx.WHITE)  
      speed.SetMiddleTextFont(wx.Font(8, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD))  
      speed.SetHandColour(wx.Colour(255, 50, 0))  
      speed.DrawExternalArc(False)  
      speed.SetSpeedValue(44)  
      sizer.Add(panel1, 1, wx.EXPAND)  
      panel.SetSizer(sizer)  
  
      mainSizer = wx.BoxSizer(wx.VERTICAL)  
      mainSizer.Add(panel, 1, wx.EXPAND)  
      self.SetSizer(mainSizer)  
      mainSizer.Layout()   
  
  class MyApp(wx.App):  
      '''Application class is only run if it is __main__. '''  
      def OnInit(self):  
          title = "test code"  
          pos = (400,400)  
          size =(570,280)  
          self.frame = class_myframe(title, pos , size)  
          self.frame.Show(True)  
          self.SetTopWindow(self.frame)  
          return True  
  
  class class_myframe(wx.Frame):  
      def __init__(self,title,pos,size):  
          wx.Frame.__init__(self, None, wx.ID_ANY, title, pos, size)  
          self.panel_one = PanelOne(self)  
          self.boxsizer = wx.BoxSizer(wx.VERTICAL)  
          self.boxsizer.Add(self.panel_one, 1, wx.EXPAND)  
          self.SetSizer(self.boxsizer)  
          self.boxsizer.Fit(self) # This changes the size of the frame to Fit all the widgets  
          self.boxsizer.Layout()  
  
  app = MyApp(False)   
  app.MainLoop()  
  </code></pre>