git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41771
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
# Python Code By:
#
# Andrea Gavana, @ 02 Oct 2006
# Python Code By:
#
# Andrea Gavana, @ 02 Oct 2006
-# Latest Revision: 04 Oct 2006, 20.00 GMT
+# Latest Revision: 05 Oct 2006, 20.00 GMT
#
#
# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please
#
#
# For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please
FlatNotebook Is Freeware And Distributed Under The wxPython License.
FlatNotebook Is Freeware And Distributed Under The wxPython License.
-Latest Revision: Andrea Gavana @ 04 Oct 2006, 20.00 GMT
-Version 0.3.
+Latest Revision: Andrea Gavana @ 05 Oct 2006, 20.00 GMT
+Version 0.4.
return self._pages._activeTextColor
return self._pages._activeTextColor
- def SetPageImageIndex(self, page, imgindex):
+ def SetPageImage(self, page, imgindex):
"""
Sets the image index for the given page. Image is an index into the
image list which was set with SetImageList.
"""
"""
Sets the image index for the given page. Image is an index into the
image list which was set with SetImageList.
"""
- self._pages.SetPageImageIndex(page, imgindex)
+ self._pages.SetPageImage(page, imgindex)
def GetPageImageIndex(self, page):
def GetPageImageIndex(self, page):
return
# We draw the 'x' on the active tab only
return
# We draw the 'x' on the active tab only
- if tabIdx != self.GetSelection() or tabIdx < 0 or not self.CanFitToScreen(tabIdx):
+ if tabIdx != self.GetSelection() or tabIdx < 0:
return
# Set the bitmap according to the button status
return
# Set the bitmap according to the button status
self.DrawRightArrow(dc)
selection = self.GetSelection()
self.DrawRightArrow(dc)
selection = self.GetSelection()
+
+ if selection == -1:
+ event.Skip()
+ return
- if selection != -1:
- self.DrawTabX(dc, self._pagesInfoVec[selection].GetXRect(), selection)
+ if not self.IsTabVisible(selection):
+ if selection == len(self._pagesInfoVec) - 1:
+ if not self.CanFitToScreen(selection):
+ event.Skip()
+ return
+ else:
+ event.Skip()
+ return
+
+ self.DrawTabX(dc, self._pagesInfoVec[selection].GetXRect(), selection)
- def SetPageImageIndex(self, page, imgindex):
+ def SetPageImage(self, page, imgindex):
""" Sets the image index associated to a page. """
if page < len(self._pagesInfoVec):
""" Sets the image index associated to a page. """
if page < len(self._pagesInfoVec):