hi all,
if I split an auinotebook, then the active page on the source tabs is
page 0, not the one that was active before splitting.
This is explicitly established in the Split method in auibook.py but I
would like to override this behaviour so that last active page remains
active in source tabs. I could subclass auiNotebook and overload the
Split method but I put my issue here in case Andrea or someone else
have cleaner proposals or solutions
Marco
Hi,
hi all,
if I split an auinotebook, then the active page on the source tabs is
page 0, not the one that was active before splitting.
This is explicitly established in the Split method in auibook.py but I
would like to override this behaviour so that last active page remains
active in source tabs. I could subclass auiNotebook and overload the
Split method but I put my issue here in case Andrea or someone else
have cleaner proposals or solutions
I believe there is a relatively straightforward solution to this, but
it will need to be implemented in the Split() method itself in the
auibook.py code. As we already have the `src_idx` page index that is
about to be moved somewhere else, we could check for the current
selection and, if the currently selected page is not the one that is
being split away we could derive its new index (after the split) and
set it as active.
If no one has anything against this approach (and if it makes sense),
I'll try to implement it as soon as I can.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 10 April 2012 17:32, Marco Prosperi wrote:
it's good for me. Thanks for the prompt answer
Marco
···
I believe there is a relatively straightforward solution to this, but
it will need to be implemented in the Split() method itself in the
auibook.py code. As we already have the `src_idx` page index that is
about to be moved somewhere else, we could check for the current
selection and, if the currently selected page is not the one that is
being split away we could derive its new index (after the split) and
set it as active.
If no one has anything against this approach (and if it makes sense),
I'll try to implement it as soon as I can.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/
I have implemented it using these ideas, and committed it to SVN.
Could you please test and see if it works?
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 10 April 2012 17:46, Andrea Gavana wrote:
Hi,
On 10 April 2012 17:32, Marco Prosperi wrote:
hi all,
if I split an auinotebook, then the active page on the source tabs is
page 0, not the one that was active before splitting.
This is explicitly established in the Split method in auibook.py but I
would like to override this behaviour so that last active page remains
active in source tabs. I could subclass auiNotebook and overload the
Split method but I put my issue here in case Andrea or someone else
have cleaner proposals or solutions
I believe there is a relatively straightforward solution to this, but
it will need to be implemented in the Split() method itself in the
auibook.py code. As we already have the `src_idx` page index that is
about to be moved somewhere else, we could check for the current
selection and, if the currently selected page is not the one that is
being split away we could derive its new index (after the split) and
set it as active.
If no one has anything against this approach (and if it makes sense),
I'll try to implement it as soon as I can.
I have implemented it using these ideas, and committed it to SVN.
Could you please test and see if it works?
yes it works! thank you
There is another (similar) issue that I didn't notice before. You
could verify it also with the demo:
- drag the last tab of the auinotebook on the right so that you have
a new tabctrl on the right (1)
- select the last tab in the first tabctrl
- then close the page dragged at point (1)
Now in the first tabctrl the visible page changes to the first instead
of remaining the last selected
Marco
I also noticed that- If you keep track, or rather: try to keep track via
ID, you are lost ...
Right now I am tracking them via wx.window object, i.e.
wx._windows.Panel; Proxy of ...
A unified panel object-to-id method implemented in auiNotebook was a
solution. Right now my tracking works for me, but I implemented it via a
sqlite db ...
Cheers
···
Am 12.04.12 09:34, schrieb Marco Prosperi:
I have implemented it using these ideas, and committed it to SVN.
Could you please test and see if it works?
yes it works! thank you
There is another (similar) issue that I didn't notice before. You
could verify it also with the demo:
- drag the last tab of the auinotebook on the right so that you have
a new tabctrl on the right (1)
- select the last tab in the first tabctrl
- then close the page dragged at point (1)
Now in the first tabctrl the visible page changes to the first instead
of remaining the last selected
Marco
Hi,
I have implemented it using these ideas, and committed it to SVN.
Could you please test and see if it works?
yes it works! thank you
There is another (similar) issue that I didn't notice before. You
could verify it also with the demo:
- drag the last tab of the auinotebook on the right so that you have
a new tabctrl on the right (1)
- select the last tab in the first tabctrl
- then close the page dragged at point (1)
Now in the first tabctrl the visible page changes to the first instead
of remaining the last selected
I suppose you are using the style AUI_NB_CLOSE_ON_ALL_TABS for the
notebook. If this is the case, this issue should be fixed in SVN. If
this is not the case, then restoring the previous selection on the
other tab ctrl (the previous active one) may be a bit tricky and I
don't have a solution for that.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 12 April 2012 09:34, Marco Prosperi wrote:
I suppose you are using the style AUI_NB_CLOSE_ON_ALL_TABS for the
notebook. If this is the case, this issue should be fixed in SVN. If
this is not the case, then restoring the previous selection on the
other tab ctrl (the previous active one) may be a bit tricky and I
don't have a solution for that.
Andrea.
With the new code the problem seems to be still there (with
AUI_NB_CLOSE_ON_ALL_TABS). I'm with WinVista32, py2.6, wxpy2.9
Marco
Hi,
I suppose you are using the style AUI_NB_CLOSE_ON_ALL_TABS for the
notebook. If this is the case, this issue should be fixed in SVN. If
this is not the case, then restoring the previous selection on the
other tab ctrl (the previous active one) may be a bit tricky and I
don't have a solution for that.
Andrea.
With the new code the problem seems to be still there (with
AUI_NB_CLOSE_ON_ALL_TABS). I'm with WinVista32, py2.6, wxpy2.9
When you close the last page in the split tab control, is that page
active or not? If it is, then there is no way to get back to the old
selection of the previously active tab control (i.e., the one with
many tabs left). If the last tab is not active, then clicking on the
close button should not activate it (as I changed this behaviour on
purpose) and you should get your old active page back (I can see it in
the demo as well).
If I am missing the point, please provide an accurate description of
what I should do to re-create the issue.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
···
On 23 April 2012 08:51, Marco Prosperi wrote:
When you close the last page in the split tab control, is that page
active or not? If it is, then there is no way to get back to the old
selection of the previously active tab control (i.e., the one with
many tabs left). If the last tab is not active, then clicking on the
close button should not activate it (as I changed this behaviour on
purpose) and you should get your old active page back (I can see it in
the demo as well).
If I am missing the point, please provide an accurate description of
what I should do to re-create the issue.
Andrea.
ok, now I see what you see. I tried to investigate further: I've tried
to overload OnTabClicked to track the last activated tab for a given
auitabctrl and to overload DeletePage so that after deleting a page I
could activate the last tracked activepage for every auitabctrl but
without success. I surrender
Marco