Hi Andrea & NG,
Andrea, I love your speed …
Ok, I think I have fixed it… on those lines of code, I have simply added:
if wx.Platform != ‘WXMAC’:
dlg.SetFont(wx.Font(8, wx.NORMAL, wx.NORMAL, wx.NORMAL, False))
I hope it will work on Mac now
I have re-uploaded the source code and the demo in the usual place:
http://xoomer.virgilio.it/infinity77/eng/freeware.html#notebookctrl
Great!
It might be that due to the absense of Robin, we are working with an outdated release of wxMac,
as wxPython for Mac contains a lot of bugs that the CVS of wxMac doesn’t. Luckily Robin will
be back soon and hopefully make your controls part of wxPython.
Yes, Christmas is approaching very fast, and I am waiting for the Christmas gift from Robin, which is the new release of wxPython
I’m sure that’s true for all of us
- When debugging before your control, all the tab pages were visible next to each other
in columns when I was adding pages with selected = True. I’ve fixed that, but now I
think think it might actually sometimes be usefull to be able to switch from a tabbed
view to a column page view, in which no tabs are shown but in which the horizontal
sizer unhides or shows all the tab equally next to each other in columns. This might
be handy eg for comparing files, while editing them and so on… Hopefully it is not so
difficult: hide the tabs and show all pages. Of course this doesnt make sense for 20
pages, but for two to four pages it might.
Yes, this can be done easily (I suppose). I will think about it tomorrow and I will let you know if I can write some intelligent code in wxPython about this feature.
Again, great!
- A bit more ambitious, but possible request, which would turn this ctrl in a killer ctrl!
How about the possibility of dragging and dropping a notebookpage between two
different notebookctrls. What for? Imagine tool palettes or debug panels, etc…
This would be very useful for people who can then layout their working environment
as they want. A lot of commercial applications support this. As a consequence it
should be possible if a user eg double clicks a tab that this page is opened in a new
frame with a notebookctrl, in which the double clicked page is the only page at start.
Pages are then almost autonomous objects which can be passed from one to another
notebookctrl or start a new notebookctrl on their own. I hope I am clear. Probably
this can be done with the wxWindow.Reparent method. (It says that this method is
only available on Windows and GTK, but I believe in wxWidgets 2.6.2 it is available
for Mac as well.) This feature could really boost the user interface of SPE and I am
sure of many other applications.
Mhm… this is much more complicated, I think. First, drag and drop of tabs between different NotebookCtrl would require setting up some DnD action that knows what is dragging and dropping. I mean, dropping a tab from a NotebookCtrl to another one means storing all information about the dragged tab (not only the tab, but also the NotebookCtrl page). I have thought about it when I was developing NotebookCtrl, but I didn’t find an easy way to store all this information. cPickle and DnD samples from wxPython demo didn’t help. So, in this case, I would like to ask to our wxPython gurus if is there a way to implement something like this (also new ideas on cPickle and wxPython DnD are welcome ).
Almost the same applies to double-click + reparenting, but probably in this case is simpler. Reparenting is a very useful thing in wxPython in this case, although I have almost never used it in my apps.
In any case, if someone in this kind NG has some suggestion about DnD between different NotebookCtrl, I would be very happy to learn something more.
Well, I would say that for drag and drop you also need to reparent.
Otherwise I even can not use it (explanation later). I see it like
this, a notebookpage would consist as an empty wxPanel, which acts as a
parent for any custom control. What happens with a drag and drop would
be from notebook1 to notebook2:
-
a new page gets created in notebook2
-
the custom control is reparented to this new page
-
the old page/parent is deleted
I never experimented with reparenting either. It could be good for
floatable/undockable toolbars, another desperately needed control
(hint, hint ;-). But if the ‘Reparent’ method says what it does
it could actually be quite simple. Unfortunately reality might be
different. Why it is important that there is no pickling or copying
(besides the fact that this is impossible) is that an application might
reference to the content of a page immediately and not always through
the notebook. For example the class browser in SPE is accessed as
self.explore and not as self.sidebar.GetPage(0) or something. I think
when you reparent that self.explore will still work as a reference. (or
I hope…) Maybe someone who has used reparenting could reply.
Thanks for considering,
Thanks to you for your efforts with SPE. Keep up the great work!
Haha, thank yourself, you became part of it!
Th…
Stani