parameters: (self, page_idx, page, caption, select=False, bitmap=wx.NullBitmap, disabled_bitmap=wx.NullBitmap,
                     control=None)
return_statement: return True
docstring: This is similar to :meth:`AddPage`, but allows the ability to specify the insert location.
  
          :param integer `page_idx`: specifies the position for the new page;
          :param Window `page`: the page to be added;
          :param string `caption`: specifies the text for the new page;
          :param bool `select`: specifies whether the page should be selected;
          :param Bitmap `bitmap`: the bitmap to display in the enabled tab;
          :param Bitmap `disabled_bitmap`: the bitmap to display in the disabled tab;
          :param Window `control`: almost any :class:`Window` -derived instance to be located
           inside a tab.
docstring_summary: This is similar to :meth:`AddPage`, but allows the ability to specify the insert location.
docstring_tokens: This is similar to : meth : AddPage but allows the ability to specify the insert location .
function: def InsertPage(self, page_idx, page, caption, select=False, bitmap=wx.NullBitmap, disabled_bitmap=wx.NullBitmap,
                     control=None):
          """
          This is similar to :meth:`AddPage`, but allows the ability to specify the insert location.
  
          :param integer `page_idx`: specifies the position for the new page;
          :param Window `page`: the page to be added;
          :param string `caption`: specifies the text for the new page;
          :param bool `select`: specifies whether the page should be selected;
          :param Bitmap `bitmap`: the bitmap to display in the enabled tab;
          :param Bitmap `disabled_bitmap`: the bitmap to display in the disabled tab;
          :param Window `control`: almost any :class:`Window` -derived instance to be located
           inside a tab.
          """
  
          if not page:
              return False
  
          page.Reparent(self)
          info = AuiNotebookPage()
          info.window = page
          info.caption = caption
          info.bitmap = bitmap
          info.active = False
          info.control = control
  
          originalPaneMgr = framemanager.GetManager(page)
          if originalPaneMgr:
              originalPane = originalPaneMgr.GetPane(page)
  
              if originalPane:
                  info.hasCloseButton = originalPane.HasCloseButton()
  
          if bitmap.IsOk() and not disabled_bitmap.IsOk():
              disabled_bitmap = MakeDisabledBitmap(bitmap)
  
          info.dis_bitmap = disabled_bitmap
  
          # if there are currently no tabs, the first added
          # tab must be active
          if self._tabs.GetPageCount() == 0:
              info.active = True
  
          self._tabs.InsertPage(page, info, page_idx)
  
          # if that was the first page added, even if
          # select is False, it must become the "current page"
          # (though no select events will be fired)
          if not select and self._tabs.GetPageCount() == 1:
              select = True
  
          active_tabctrl = self.GetActiveTabCtrl()
          if page_idx >= active_tabctrl.GetPageCount():
              active_tabctrl.AddPage(page, info)
          else:
              active_tabctrl.InsertPage(page, info, page_idx)
  
          force = False
          if control:
              force = True
              control.Reparent(active_tabctrl)
              control.Show()
  
          self.UpdateTabCtrlHeight(force=force)
          self.DoSizing()
          active_tabctrl.DoShowHide()
  
          # adjust selected index
          if self._curpage >= page_idx:
              self._curpage += 1
  
          if select:
              self.SetSelectionToWindow(page)
  
          return True
function_tokens: def InsertPage ( self , page_idx , page , caption , select = False , bitmap = wx . NullBitmap , disabled_bitmap = wx . NullBitmap , control = None ) : if not page : return False page . Reparent ( self ) info = AuiNotebookPage ( ) info . window = page info . caption = caption info . bitmap = bitmap info . active = False info . control = control originalPaneMgr = framemanager . GetManager ( page ) if originalPaneMgr : originalPane = originalPaneMgr . GetPane ( page ) if originalPane : info . hasCloseButton = originalPane . HasCloseButton ( ) if bitmap . IsOk ( ) and not disabled_bitmap . IsOk ( ) : disabled_bitmap = MakeDisabledBitmap ( bitmap ) info . dis_bitmap = disabled_bitmap # if there are currently no tabs, the first added # tab must be active if self . _tabs . GetPageCount ( ) == 0 : info . active = True self . _tabs . InsertPage ( page , info , page_idx ) # if that was the first page added, even if # select is False, it must become the "current page" # (though no select events will be fired) if not select and self . _tabs . GetPageCount ( ) == 1 : select = True active_tabctrl = self . GetActiveTabCtrl ( ) if page_idx >= active_tabctrl . GetPageCount ( ) : active_tabctrl . AddPage ( page , info ) else : active_tabctrl . InsertPage ( page , info , page_idx ) force = False if control : force = True control . Reparent ( active_tabctrl ) control . Show ( ) self . UpdateTabCtrlHeight ( force = force ) self . DoSizing ( ) active_tabctrl . DoShowHide ( ) # adjust selected index if self . _curpage >= page_idx : self . _curpage += 1 if select : self . SetSelectionToWindow ( page ) return True