Hi, Andrea:
The aui in python version is very good for me to make customization. I like it. Thanks for your make it avaible!
When I trying it, I found some issues and provide patch in attachment, please review!
The issue are:
- When close button is closed in side’s notebook, all page will be closed. The steps maybe:
a) page is removed from notebook firstly
b) call ClosePane(page)
The issue exist from a) -> b), page is removed from notebook, but the notebook_id and dock_direction is forget to be cleared.
-
DrawFocusRect() is not a member for RendererNative class.
-
For AuiSimpleTabArt class, when popup the window list, the caption should be get via “page.caption”
I like the SimpleTabArt but I think it is not suitable used for side’s notebook if tab is in bottom, looks very strange.
Thank
Patches:
Index: framemanager.py
···
===================================================================
— framemanager.py (revision 20)
+++ framemanager.py (working copy)
@@ -3997,6 +3997,8 @@
window = notebook.GetPage(0)
notebook.RemovePage(0)
info = self.GetPane(window)
-
info.notebook_id = -1
-
info.dock_direction = AUI_DOCK_NONE if info.IsOk(): # Note: this could change our paneInfo reference ... self.ClosePane(info)
Index: tabart.py
— tabart.py (revision 20)
+++ tabart.py (working copy)
@@ -1120,7 +1120,7 @@
selected_textx, selected_texty)
focusRect.Inflate(2, 2)
-
wx.RendererNative.Get().DrawFocusRect(wnd, dc, focusRect, 0)
-
#wx.RendererNative.Get().DrawFocusRect(wnd, dc, focusRect, 0) out_button_rect = wx.Rect() # draw close button if necessary
@@ -1283,7 +1283,7 @@
for i, page in enumerate(pages):
if useImages:
-
menuItem = wx.MenuItem(menuPopup, 1000+i, caption)
-
menuItem = wx.MenuItem(menuPopup, 1000+i, page.caption) if page.bitmap: menuItem.SetBitmap(page.bitmap)
@@ -1291,7 +1291,7 @@
else:
-
menuPopup.AppendCheckItem(1000+i, caption)
-
menuPopup.AppendCheckItem(1000+i, page.caption) menuPopup.Enable(1000+i, page.enabled)
Ken