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

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

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

Definition at line 4962 of file flatnotebook.py.

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

        :param `event`: a `wx.MouseEvent` event to be processed.
        """

        # Test if this style is enabled
        agwStyle = self.GetParent().GetAGWWindowStyleFlag()

        if not agwStyle & FNB_MOUSE_MIDDLE_CLOSES_TABS:
            return

        where, tabIdx = self.HitTest(event.GetPosition())

        if where == FNB_TAB:
            #self.DeletePage(tabIdx)
            # hack specific to Whyteboard, here.
            self.Parent.Parent.current_tab = tabIdx
            self.Parent.Parent.canvas = self.Parent.GetPage(tabIdx)
            self.Parent.Parent.on_close_tab()

        event.Skip()



Generated by  Doxygen 1.6.0   Back to index