parameters: (self, page_idx, hasCloseButton)
return_statement: return True
docstring: Sets whether a tab should display a close button or not.
  
          :param integer `page_idx`: the page index;
          :param bool `hasCloseButton`: ``True`` if the page displays a close button.
  
          :note: This can only be called if ``AUI_NB_CLOSE_ON_ALL_TABS`` is specified.
docstring_summary: Sets whether a tab should display a close button or not.
docstring_tokens: Sets whether a tab should display a close button or not .
function: def SetCloseButton(self, page_idx, hasCloseButton):
          """
          Sets whether a tab should display a close button or not.
  
          :param integer `page_idx`: the page index;
          :param bool `hasCloseButton`: ``True`` if the page displays a close button.
  
          :note: This can only be called if ``AUI_NB_CLOSE_ON_ALL_TABS`` is specified.
          """
  
          if page_idx >= self._tabs.GetPageCount():
              return False
  
          if self._agwFlags & AUI_NB_CLOSE_ON_ALL_TABS == 0:
              raise Exception("SetCloseButton can only be used with AUI_NB_CLOSE_ON_ALL_TABS style.")
  
          # update our own tab catalog
          page_info = self._tabs.GetPage(page_idx)
          page_info.hasCloseButton = hasCloseButton
  
          # update what's on screen
          ctrl, ctrl_idx = self.FindTab(page_info.window)
          if not ctrl:
              return False
  
          info = ctrl.GetPage(ctrl_idx)
          info.hasCloseButton = page_info.hasCloseButton
          ctrl.Refresh()
          ctrl.Update()
  
          return True
function_tokens: def SetCloseButton ( self , page_idx , hasCloseButton ) : if page_idx >= self . _tabs . GetPageCount ( ) : return False if self . _agwFlags & AUI_NB_CLOSE_ON_ALL_TABS == 0 : raise Exception ( "SetCloseButton can only be used with AUI_NB_CLOSE_ON_ALL_TABS style." ) # update our own tab catalog page_info = self . _tabs . GetPage ( page_idx ) page_info . hasCloseButton = hasCloseButton # update what's on screen ctrl , ctrl_idx = self . FindTab ( page_info . window ) if not ctrl : return False info = ctrl . GetPage ( ctrl_idx ) info . hasCloseButton = page_info . hasCloseButton ctrl . Refresh ( ) ctrl . Update ( ) return True