Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 661595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:17:05+00:00 2026-05-13T23:17:05+00:00

with this code: import wx import wx.aui class MyFrame(wx.Frame): def __init__(self, parent, id=-1, title=’wx.aui

  • 0

with this code:

import wx
import wx.aui

class MyFrame(wx.Frame):

    def __init__(self, parent, id=-1, title='wx.aui Test',
                 pos=wx.DefaultPosition, size=(800, 600),
                 style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)

        self._mgr = wx.aui.AuiManager(self)

        # create several text controls
        text1 = wx.TextCtrl(self, -1, 'Pane 1 - sample text',
                            wx.DefaultPosition, wx.Size(200,150),
                            wx.NO_BORDER | wx.TE_MULTILINE)

        text2 = wx.TextCtrl(self, -1, 'Pane 2 - sample text',
                            wx.DefaultPosition, wx.Size(200,150),
                            wx.NO_BORDER | wx.TE_MULTILINE)


        info = wx.aui.AuiPaneInfo()
        info.CaptionVisible(True)
        info.BottomDockable(False)
        info.LeftDockable(False)
        info.RightDockable(False)
        info.PaneBorder(False)
        info.Top()
        info.Row(1)

        info2 = wx.aui.AuiPaneInfo()
        info2.CaptionVisible(True)
        info2.BottomDockable(False)
        info2.LeftDockable(False)
        info2.RightDockable(False)
        info2.Top()
        info2.Row(2)

        self._mgr.AddPane(text1, info, 'Pane Number One')
        self._mgr.AddPane(text2, info2, 'Pane Number Two')

        self._mgr.Update()

        self.Bind(wx.EVT_CLOSE, self.OnClose)


    def OnClose(self, event):
        self._mgr.UnInit()
        self.Destroy()


app = wx.App()
frame = MyFrame(None)
frame.Show()
app.MainLoop()

the two panes that I create are docked in the Top.
The info.Row(1) and info2.Row(2) put the two panes one after another:

_TOP_
Pane1
Pane2

Now, if I move on Pane2, this docks in the Top and this situation occurs:

_TOP_
Pane1|Pane2

I want:
1. to avoid this situation (only one pane per row!)
2. if I move, dock the pane in the bottom/top of another pane

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:17:05+00:00Added an answer on May 13, 2026 at 11:17 pm

    Maybe the AuiNotebook wxPython sample works for you?

    import wx
    import wx.aui
    
    ########################################################################
    class TabPanel(wx.Panel):
        """
        This will be the first notebook tab
        """
        #----------------------------------------------------------------------
        def __init__(self, parent):
            """"""
    
            wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
    
            sizer = wx.BoxSizer(wx.VERTICAL)
            txtOne = wx.TextCtrl(self, wx.ID_ANY, "")
            txtTwo = wx.TextCtrl(self, wx.ID_ANY, "")
    
            sizer = wx.BoxSizer(wx.VERTICAL)
            sizer.Add(txtOne, 0, wx.ALL, 5)
            sizer.Add(txtTwo, 0, wx.ALL, 5)
    
            self.SetSizer(sizer)
    
    class DemoPanel(wx.Panel):
        """
        This will be the first notebook tab
        """
        #----------------------------------------------------------------------
        def __init__(self, parent):
            """"""
            wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
    
            # create the AuiNotebook instance
            nb = wx.aui.AuiNotebook(self)
    
            # add some pages to the notebook
            pages = [(TabPanel(nb), "Tab 1"),
                     (TabPanel(nb), "Tab 2"),
                     (TabPanel(nb), "Tab 3")]
            for page, label in pages:
                nb.AddPage(page, label)
    
            sizer = wx.BoxSizer(wx.VERTICAL)
            sizer.Add(nb, 1, wx.EXPAND)
            self.SetSizer(sizer)
    
    ########################################################################
    class DemoFrame(wx.Frame):
        """
        Frame that holds all other widgets
        """
    
        #----------------------------------------------------------------------
        def __init__(self):
            """Constructor"""
            wx.Frame.__init__(self, None, wx.ID_ANY,
                              "AUI-Notebook Tutorial",
                              size=(600,400))
            panel = DemoPanel(self)
            self.Show()
    
    #----------------------------------------------------------------------
    if __name__ == "__main__":
        app = wx.PySimpleApp()
        frame = DemoFrame()
        app.MainLoop()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this code: import wx app = None class Plugin(wx.Panel): def __init__(self, parent, *args, **kwargs):
I have this code: import wx class Plugin(wx.Panel): def __init__(self, parent, *args, **kwargs): panel
I'm running this simple code: import threading, time class reqthread(threading.Thread): def run(self): for i
I'm studying querulous and started with this code: import com.twitter.querulous.evaluator.QueryEvaluator class Querulous { def
this is my code: import java.util.Calendar; import java.util.Locale; public class test { /** *
Here I found this code: import java.awt.*; import javax.swing.*; public class FunWithPanels extends JFrame
I ran into unbound method error in python with this code: import random class
i have this code: import csv import collections def do_work(): (data,counter)=get_file('thefile.csv') b=samples_subset1(data, counter,'/pythonwork/samples_subset3.csv',500) return
Consider this code: import java.util.*; class jm45 implements Comparator<jm45> { private int x; jm45(int
Consider this code: import java.util.regex.*; public class Pattern3 { /** * @param args the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.