title: How to add redefined wx widgets into already created box sizers?
body: <p>I have to switch from HyperlinkCtrl() widget into StaticText() and also reverse under some conditions or calling different functions for one particular field in wxPython.</p>
  
  <p>But the layout and sizer is already created with list of fields and one of them is our before said HyperlinkCtrl().All the layouts and sizers are kept in two seperate function.</p>
  
  <p>So switching is implemented by <code>Disabled()</code> and <code>Enabled()</code> functions of HyperlinkCtrl().</p>
  
  <p>The problem is after redefined with StaticText() and could not add this into box sizer.</p>
  
  <pre><code>def createLayout(self):
  
           #some code 
           ........
           self.Author = wx.HyperlinkCtrl(self, -1, "", "~")
           self.Author.SetFont(self.fontSmall)
           ..........
  
  def createSizers(self):
          ............
          self.mainSizer = wx.BoxSizer(wx.VERTICAL)
          ...............
          self.DetailsSizer = wx.BoxSizer(wx.VERTICAL)
          self.DetailsSizer.Add(self.Author, 0, wx.ALIGN_LEFT)
          .................
  def changeFunc(self):
          if true
            self.hyperFunc()
          else
            self.statisFunc()
  </code></pre>
  
  <p>To disable and enable widgets I did the following mothod.</p>
  
  <pre><code>def staticFunc(self):
      # Author &amp; URL
  
      self.Author.Hide()
      if self.Author.IsEnabled():
          self.Author = wx.StaticText(self, -1, "N/A")
          self.Author.SetFont(self.fontSmall)
          self.Author.Disable()
      self.Author.Show()
  
  def hyperFunc(self):
       self.Author = wx.HyperlinkCtrl(self, -1, "", "")
       self.Author.Enable()
       self.Author.SetURL("name")
  </code></pre>
  
  <p>With the above change staticText is created but I could not put into the sizer and also switching from staticText to hyperlink is not working properly.</p>
  
  <p>Please help me on this.</p>