[wxPython-users] ANN: FlatNotebook Control For wxPython ;-)
Andrea Gavana
andrea.gavana at gmail.com
Tue Oct 10 15:06:13 PDT 2006
Hello NG,
Ok, it seems all the bugs are fixed now (please note: it seems :-D):
1) @limodou: now the Smart Tabbing works: it was a wxPython idiocy
from my part that snippet of code;
2) @limodou: now Ctrl+[Shift]+Tab generate a
wxEVT_FLATNOTEBOOK_PAGE_CHANGING and its son
wxEVT_FLATNOTEBOOK_PAGE_CHANGED;
3) @limodou & Alessandro: AddPage (if select=True), InsertPage (if
select=True) and DeletePage now generate the above events;
4) @Werner: I reformatted the inputs for AddPage and InsertPage to
match the wxWidgets/wxPython parameter names. If you find anything
strange on that, please let me know;
5) @Robin: I am making the patches I'll send you later; please see
item (6) if you can help;
6) @Matthias: The issue of DnD with icons should be fixed. Now if you
drag a tab that contains an image from a notebook to another notebook,
that image is reassigned in the dropped tab in the new notebook,
whether by creating a new wx.ImageList (if the second notebook does
not hold one) or by adding the tab image to the second notebook's
imagelist.
NB: this part of the code has a drawing problem:
a) By Drag 'n' Drop from an oldNotebook to a newNotebook, from this
snippets of code:
# Get the bitmap of the dragged tab
bmp = oldNotebook.GetImageList().GetBitmap(imageindex)
# Get the wx.ImageList of the target notebook
newImageList = newNotebook.GetImageList()
if not newImageList:
# Target notebook has no ImageList, so create one
xbmp, ybmp = bmp.GetWidth(), bmp.GetHeight()
newImageList = wx.ImageList(xbmp, ybmp)
imageindex = 0
else:
imageindex = newImageList.GetImageCount()
newImageList.Add(bmp)
newNotebook.SetImageList(newImageList)
Ok, from now on, the added bitmap to the second notebook does *not*
paint transparent anymore, whatever trick I use. I get the bitmap with
a black background. Is it possible that retrieving a bitmap from an
imagelist and putting it to another screws up the imagelist drawing?
Please note that I use:
wx.ImageList.Draw(imageIndex, dc, xpos, ypos,
wx.IMAGELIST_DRAW_TRANSPARENT, True)
For this problem, I don't have a solution right now.
You can find the sources, demo and beautified documentation in the usual places:
http://xoomer.alice.it/infinity77/eng/FlatNotebook.html
http://xoomer.alice.it/infinity77/ita/FlatNotebook.html
I welcome every suggestion.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
More information about the wxpython-users
mailing list