+ def DrawFocusRectangle(self, dc, pageContainer, page):
+ """ Draws a focus rectangle like the native Notebooks. """
+
+ if not page._hasFocus:
+ return
+
+ tabPos = page.GetPosition()
+ if pageContainer.GetParent().GetWindowStyleFlag() & FNB_VC8:
+ vc8ShapeLen = self.CalcTabHeight(pageContainer) - VERTICAL_BORDER_PADDING - 2
+ tabPos.x += vc8ShapeLen
+
+ rect = wx.RectPS(tabPos, page.GetSize())
+ rect = wx.Rect(rect.x+2, rect.y+2, rect.width-4, rect.height-8)
+
+ dc.SetBrush(wx.TRANSPARENT_BRUSH)
+ dc.SetPen(self._focusPen)
+ dc.DrawRoundedRectangleRect(rect, 2)
+
+