AuiManager ensure panel visibility?

The Show Method will move a window to the top if it is hidden which
is not what you need if someone is typing into another window. I guess you are worried that the new text might be scrolled off an
editor/text window that it is added to if the window is in a
background tab, the trick would be to remember the last line you
wrote to for each tab and in on OnShow event handler use that
windows ensure line visible method, e.g if it is a text control use
the text controls ShowPosition method, if a list box then Use
EnsureVisible, etc.
Gadget/Steve

···

On 18/07/2012 8:42 AM, jj wrote:

Hi!

  Have been using wxPython for a while now in my project and some

how eventually have found workarounds for many problems, but this
one just don’t give up! :smiley:

  I'm making a small Eclipse like IDE, I have a AuiManager, who

contains about 4 windows and a Notebook who conatins editors.
Problem is, that when I print something in one of thouse windows,
I want to make sure that it is visible, since it might be hidden
as a tab.

  I do that whth **auiManager.Show(myWindow, True)**      , and here

is the problem, if user in that time was writing something in
editor, focus is changed to myWindow and user have to
manualy refocus editor. I tried to find something like **auiManager.EnsureVisibility(**myWindow) ,
but i can’t seem to find it. :frowning:

    Of course there is a workaroud, I think, to store editors focus

before Show function and to restore it after, but it seems to me
that it is the wrong way, just doesn’t seem right.

    Any ideas or I have missed some cool auiManager function?



    Best regards, Jānis J.

  To unsubscribe, send email to

or visit

wxPython-users+unsubscribe@googlegroups.com
http://groups.google.com/group/wxPython-users?hl=en

Yea, that’s the way which I mentioned in my post and I repeat myself, this method seems wrong to me, there’s got to be a more elegant solution, at least I hope so! :slight_smile:

I’m Attaching little example, try to write something in upper editor and You’ll see what happens.

P.S. In process of making this example I found that there is no such problem if “console” tab is the only tab in pane.

auiManagerShowTest.py (2.09 KB)

···

On Wednesday, July 18, 2012 9:58:45 PM UTC+3, Gadget Steve wrote:

On 18/07/2012 8:42 AM, jj wrote:

Hi!

  Have been using wxPython for a while now in my project and some

how eventually have found workarounds for many problems, but this
one just don’t give up! :smiley:

  I'm making a small Eclipse like IDE, I have a AuiManager, who

contains about 4 windows and a Notebook who conatins editors.
Problem is, that when I print something in one of thouse windows,
I want to make sure that it is visible, since it might be hidden
as a tab.

  I do that whth **auiManager.Show(myWindow, True)**      , and here

is the problem, if user in that time was writing something in
editor, focus is changed to myWindow and user have to
manualy refocus editor. I tried to find something like **auiManager.EnsureVisibility(**myWindow) ,
but i can’t seem to find it. :frowning:

    Of course there is a workaroud, I think, to store editors focus

before Show function and to restore it after, but it seems to me
that it is the wrong way, just doesn’t seem right.

    Any ideas or I have missed some cool auiManager function?



    Best regards, Jānis J.

  To unsubscribe, send email to

wxPython-users+unsubscribe@googlegroups.com

  or visit [http://groups.google.com/group/wxPython-users?hl=en](http://groups.google.com/group/wxPython-users?hl=en)
The Show Method will move a window to the top if it is hidden which

is not what you need if someone is typing into another window.

I guess you are worried that the new text might be scrolled off an

editor/text window that it is added to if the window is in a
background tab, the trick would be to remember the last line you
wrote to for each tab and in on OnShow event handler use that
windows ensure line visible method, e.g if it is a text control use
the text controls ShowPosition method, if a list box then Use
EnsureVisible, etc.

Gadget/Steve