parameters: (self, pg_num, old=-2)
docstring: Change the page and focus to the the given page id
          @param pg_num: Page number to change
          @keyword old: previous selection
docstring_summary: Change the page and focus to the the given page id
          @param pg_num: Page number to change
          @keyword old: previous selection
docstring_tokens: Change the page and focus to the the given page id @param pg_num : Page number to change @keyword old : previous selection
function: def ChangePage(self, pg_num, old=-2):
          """Change the page and focus to the the given page id
          @param pg_num: Page number to change
          @keyword old: previous selection
  
          """
          cpage = self.GetSelection()
          if cpage != pg_num:
              self.SetSelection(pg_num)
  
          # Get the window that is the current page
          window = self.GetPage(pg_num)
          self.control = window
  
          # Update Frame Title
          self.frame.SetTitle(self.control.GetTitleString())
  
          # Only post page changes when the change is not from the app exiting
          # NOTE: -2 is used as default value, cant use -1 as it comes from
          #       page close events.
          if old > -2:
              cpage = old
  
          if not self.frame.IsExiting() and cpage != pg_num:
              ed_msg.PostMessage(ed_msg.EDMSG_UI_NB_CHANGED,
                                 (self, pg_num),
                                 context=self.frame.Id)
function_tokens: def ChangePage ( self , pg_num , old = - 2 ) : cpage = self . GetSelection ( ) if cpage != pg_num : self . SetSelection ( pg_num ) # Get the window that is the current page window = self . GetPage ( pg_num ) self . control = window # Update Frame Title self . frame . SetTitle ( self . control . GetTitleString ( ) ) # Only post page changes when the change is not from the app exiting # NOTE: -2 is used as default value, cant use -1 as it comes from #       page close events. if old > - 2 : cpage = old if not self . frame . IsExiting ( ) and cpage != pg_num : ed_msg . PostMessage ( ed_msg . EDMSG_UI_NB_CHANGED , ( self , pg_num ) , context = self . frame . Id )