How to get use AuiDockInfo()

Hi,everyone!
I have a frame which uses aui.AuiManager(). I want to get size and position of each window.But I didn’t get it.

import wx.lib.agw.aui as aui
import wx.grid
class agw_manager():
def init(self,panel,*args):
self.mgr = aui.AuiManager()
self.mgr.SetManagedWindow(panel)
num=len(args)
paren=panel.GetParent()

    if num<3:
    	print('False!')
        return
    
    # BestSize((-1, 150)).
    A=self.mgr.AddPane(args[1], aui.AuiPaneInfo().Top().BestSize(-1,400).MinSize((-1, 400)).CloseButton(False). Name("Notebook"))
    self.mgr.AddPane(args[0],
                aui.AuiPaneInfo().Bottom().
                Left().BestSize((180,100)).
                MinSize((100, -1)).                    
                Caption("Demo1").
                CloseButton(False).
                Name("Dee"))

    self.mgr.AddPane(args[2],
                aui.AuiPaneInfo().Right().CenterPane().
                BestSize(-1,130).
                MinSize((-1, 30)).                    
                Caption("Dessages").
                CloseButton(False).
                Name("LopgWindow"))

    if num>3 and num<=5:
    	for i in range(3,num):
    		self.mgr.AddPane(args[i],
                aui.AuiPaneInfo().Right().CenterPane().
                BestSize(-1,130).
                MinSize((-1, 30)).
                Floatable(False).
                Caption(" Messages").
                CloseButton(False).Name("LopgWindow%s"%i))        
   
    self.mgr.Update()
    self.mgr.SetAGWFlags(self.mgr.GetAGWFlags() ^ aui.AUI_MGR_TRANSPARENT_DRAG) 

    dock=aui.framemanager.AuiDockInfo()    #???????
    print(self.mgr.GetPanePositionsAndSizes())  #?????

class MainFrame(wx.Frame):

def __init__(self,title):
    wx.Frame.__init__(self, None, -1,title, size = (970, 720),
                      style=wx.DEFAULT_FRAME_STYLE)

    self.SetMinSize((640,480))
    self.Centre(wx.BOTH)
    # self.Maximize(True)

    self.md_page=None
    self.pnl=wx.Panel(self)
 
    self.leftPanel = wx.Panel(self.pnl,-1)
    grid = wx.grid.Grid(self.leftPanel, -1, wx.Point(0, 0),size=(10,100),style=wx.NO_BORDER | wx.WANTS_CHARS)
    grid.CreateGrid(500, 1)

    search_window=wx.Panel(self.leftPanel,-1)
    search_value=wx.TextCtrl(search_window,-1)
    searchBox=wx.BoxSizer(wx.HORIZONTAL)
    searchBox.Add(search_value,6,wx.LEFT,1)
    searchBox.Add(wx.Button(search_window,-1,label="GO"),1,wx.LEFT, 5)
    search_window.SetSizer(searchBox)
  
    leftBox = wx.BoxSizer(wx.VERTICAL)
    leftBox.Add(grid, 40, wx.EXPAND)
    leftBox.Add(wx.StaticText(self.leftPanel, label = "search:"), 1, wx.LEFT, 60)
    leftBox.Add(search_window,3,wx.LEFT)        
          
    self.leftPanel.SetSizer(leftBox)     


    # -------------------------------------------------------- 

    self.nb = wx.Notebook(self.pnl, -1, style=wx.CLIP_CHILDREN)  

    self.md_page=wx.Panel(self.nb)
    b = wx.Button(self.md_page, 10, "Default Button", (200, 120))
    self.nb.AddPage(self.md_page, "ove")
    self.nb.AddPage(wx.Panel(self.nb), "overviewText")    

    self.tench=wx.Panel(self.pnl)
    self.t1=wx.Panel(self.pnl) 
    self.t2=wx.Panel(self.pnl)        

    # Use the aui manager to set up everything
    
    agw_manager(self.pnl,self.leftPanel,self.nb,self.tench,self.t2,self.t1)

if name==‘main’:
app=wx.App()
Title = “Technical”
fr=MainFrame(Title)
fr.Show()
app.MainLoop()

Hi angkw567,

Normally, AuiPaneInfo is used instead of AuiDockInfo.
You can get the AuiPaneInfo of the pane that includes docking information, like this:

>>> pane = self.mgr.GetPane('Notebook')

where ‘Notebook’ is one of the pane’s names you added to the manager.
Then, you can access the docking information such as:

pane.dock_direction                       1
pane.dock_layer                           0
pane.dock_pos                             0
pane.dock_proportion                      100000
pane.dock_row                             0

To see what these attributes mean, see:
https://docs.wxpython.org/wx.aui.AuiPaneInfo.html

thank you! i get it.