parameters: (self, event)
docstring: Handles the ``wx.EVT_NAVIGATION_KEY`` for the :class:`TabNavigatorWindow`.
  
          :param `event`: a :class:`NavigationKeyEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_NAVIGATION_KEY`` for the :class:`TabNavigatorWindow`.
docstring_tokens: Handles the wx . EVT_NAVIGATION_KEY for the : class : TabNavigatorWindow .
function: def OnNavigationKey(self, event):
          """
          Handles the ``wx.EVT_NAVIGATION_KEY`` for the :class:`TabNavigatorWindow`.
  
          :param `event`: a :class:`NavigationKeyEvent` event to be processed.
          """
  
          selected = self._listBox.GetSelection()
          bk = self.GetParent()
          maxItems = bk.GetPageCount()
  
          if event.GetDirection():
  
              # Select next page
              if selected == maxItems - 1:
                  itemToSelect = 0
              else:
                  itemToSelect = selected + 1
  
          else:
  
              # Previous page
              if selected == 0:
                  itemToSelect = maxItems - 1
              else:
                  itemToSelect = selected - 1
  
          self._listBox.SetSelection(itemToSelect)
function_tokens: def OnNavigationKey ( self , event ) : selected = self . _listBox . GetSelection ( ) bk = self . GetParent ( ) maxItems = bk . GetPageCount ( ) if event . GetDirection ( ) : # Select next page if selected == maxItems - 1 : itemToSelect = 0 else : itemToSelect = selected + 1 else : # Previous page if selected == 0 : itemToSelect = maxItems - 1 else : itemToSelect = selected - 1 self . _listBox . SetSelection ( itemToSelect )