Hello Stani & NG,
thanks for all your suggestions... I have now some questions about
them:
1) Should Reparent*() methods be in the core or not? Your email seems a
little bit "contradictory" at the end.
2) How can NotebookCtrl decide which Reparent*() method to use if you only
give a double-click on a tab as information?
3) It's not very clear to me to what _notebookHistory should be referred
to. I have to keep track of it for every tabs in TabCtrl? Every page in
NotebookCtrl? In the new frames I create?
I am sorry, probably I am missing something about it... however, I was able
to run smoothly a Reparenting() action from a NotebookCtrl to a frame, with
a code similar to your suggestions. Now I see that your suggestions may be
better than my implementation, so I will implement them as soon as they
become clearer to me...
wx.Notebook.RemovePage() does not destroy the page, ok, but this method=
is not implemented in NotebookCtrl. There is no need to do it, I
suppose.
Andrea, I would implement it, to make it more consistent with the core
wxNotebookCtrl. I know that in the past I needed this, so I guess I
might once with your ctrl as well. Probably you need it yourself
anyway for the reparenting, so why not expose it?
I won't need RemovePage in reparenting. Implementing it in NotebookCtrl
would mean, as I explained yesterday:
1) Destroy the tab inside TabCtrl (so now you have N-1 tabs);
2) Hide (and *not* destroy) the panel associated to that tab (you still
have N panels inside NotebookCtrl).
This will break consistency between tabs in TabCtrl and pages in
NotebookCtrl. It will become a mess, in my opinion, unless I am missing
something obvious.
In the case I am not missing anything special, I will probably leave the
implementation of RemovePage to someone else, or I will do it if you have
some *strong* suggestions supported by code in order to accomplish it.
I don't have any idea on where to start to avoid RemovePage messing up
NotebookCtrl
Thanks a lot for your suggestions!!!
Andrea.
···
_______________________________________________
Andrea Gavana
Reservoir Engineer
MOGI ? Reservoir Characterization and Modeling Dept.
ENI S.p.A. ? Exploration & Production Division
Via Emilia, 1 ? 20097 San Donato Milanese (MI) ? Italy
Phone: +39 02 520 62972
Fax: +39 02 520 61824
E-mail: andrea.gavana@agip.it
Restyled Internet Site: http://xoomer.virgilio.it/infinity77/
____________________________________________________
Eni S.p.A.
Sede legale in Roma,
Piazzale Enrico Mattei 1, 00144 Roma
Tel. centralino: +39 06598.21
www.eni.it
Capitale sociale 4.002.934.326 i.v.
Registro Imprese di Roma,
Codice Fiscale 00484960588
Part. IVA 00905811006
R.E.A. Roma n. 756453