Logo Search packages:      
Sourcecode: whyteboard version File versions  Download package

def whyteboard::lib::flatnotebook::PageContainer::OnKeyDown (   self,
  event 
)
Handles the ``wx.EVT_KEY_DOWN`` event for L{PageContainer}.

:param `event`: a `wx.KeyEvent` event to be processed.

:note: When the L{PageContainer} has the focus tabs can be changed with
 the left/right arrow keys.

Definition at line 6085 of file flatnotebook.py.

                              :
        """
        Handles the ``wx.EVT_KEY_DOWN`` event for L{PageContainer}.

        :param `event`: a `wx.KeyEvent` event to be processed.

        :note: When the L{PageContainer} has the focus tabs can be changed with
         the left/right arrow keys.
        """

        key = event.GetKeyCode()
        if key == wx.WXK_LEFT:
            self.GetParent().AdvanceSelection(False)
            self.SetFocus()
        elif key == wx.WXK_RIGHT:
            self.GetParent().AdvanceSelection(True)
            self.SetFocus()
        elif key == wx.WXK_TAB and not event.ControlDown():
            flags = 0
            if not event.ShiftDown(): flags |= wx.NavigationKeyEvent.IsForward
            if event.CmdDown():       flags |= wx.NavigationKeyEvent.WinChange
            self.Navigate(flags)
        else:
            event.Skip()



Generated by  Doxygen 1.6.0   Back to index