Kirix Support Forums

Pane size

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Pane size

Postby Jes on Mon Oct 15, 2007 10:30 am

How I can change pane size with code manipulation?
all PaneInfo class methods can't do it
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Re: Pane size

Postby Dave on Mon Oct 15, 2007 8:34 pm

Hello,

The following code modifies the minimum size of a pane and the best size of a pane.

Code: Select all
wxAuiManager mgr;

...

wxAuiPaneInfo& pane = mgr.GetPane(wxT("pane_name"));
pane.MinSize(wxSize(50,50)).BestSize(wxSize(100,100));

mgr.Update();

This code snippet assumes you've added a pane to the wxAuiManager with the name "pane_name". The minimum size will be set to 50px wide and 50px tall and the best size will be set to 100px wide and 100px tall.

Hope this helps.

Dave.
Dave Williams
Kirix Support Team
User avatar
Dave
Kirix Support Team
 
Posts: 32
Joined: Wed Sep 21, 2005 11:07 pm

Re: Pane size

Postby Jes on Tue Oct 16, 2007 2:50 am

That's code nothing to do
after mrg.Update() all panes sizes resets to min sizes and recalc with proportional as all size of frame divided on panes count at frame (for two axis)
i think the best way to change size is saveperspective and correct it in string and loadperspective now :lol:
How set size of Dock?? and how to access without recoding your lib to it and find Dock binded to Pane ??
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Re: Pane size

Postby Jes on Mon Nov 05, 2007 7:39 am

That is code
Code: Select all
   this->SetSizeHints( wxDefaultSize, wxDefaultSize );
   m_mgr.SetManagedWindow(this);   
   m_statusBar1 = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY );
      
   m_auinotebook21 = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER | wxAUI_NB_BOTTOM);
   m_panel15 = new wxPanel( m_auinotebook21, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
   m_auinotebook21->AddPage( m_panel15, wxT("page1"), true, wxNullBitmap );
   m_mgr.AddPane(m_auinotebook21,
      wxAuiPaneInfo().Name(wxT("TopPane")).Caption(wxT("VirtualMap")).Floatable(true).
      Top().BestSize(400,600).PinButton(true).PaneBorder(true).CloseButton(true).MaximizeButton(true).Floatable(true));

   m_mgr.AddPane(new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize(1,1), wxTAB_TRAVERSAL ),
      wxAuiPaneInfo().Name(wxT("test41")).Caption(wxT("Tree Pane")).
      Center().PaneBorder(false));
   

   m_auinotebook3 = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER | wxAUI_NB_BOTTOM);
   m_panel17 = new wxPanel( m_auinotebook3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
   m_auinotebook3->AddPage( m_panel17, wxT("page2"), false, wxNullBitmap );


   m_mgr.AddPane(m_auinotebook3,
      wxAuiPaneInfo().Name(wxT("LogPane")).Caption(wxT("info")).
      Bottom().CloseButton(true).MaximizeButton(true).MinSize(50,50).BestSize(400,300));
   
   m_auinotebook4 = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxSize(200,150),  wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER | wxAUI_NB_BOTTOM);
   m_panel21 = new wxPanel( m_auinotebook4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
   m_auinotebook4->AddPage( m_panel21, wxT("a page3"), false, wxNullBitmap );
   
   m_mgr.AddPane(m_auinotebook4,
      wxAuiPaneInfo().Name(wxT("Pane1")).Caption(wxT("info")).
      Right().Layer(1).CloseButton(true).MaximizeButton(true));
   
   m_notebook31 = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER| wxAUI_NB_BOTTOM );
   m_panel23 = new wxPanel( m_notebook31, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
   m_notebook31->AddPage( m_panel23, wxT("a page7"), false );

   m_mgr.AddPane(m_notebook31,
      wxAuiPaneInfo().Name(wxT("EPane")).Caption(wxT("Enviroment")).
      Right().Layer(1).Position(2).CloseButton(true).MaximizeButton(true));

   wxPanel *m_panel21 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
   wxBoxSizer* bSizer31 = new wxBoxSizer( wxVERTICAL );
   wxTextCtrl *m_textCtrl31 = new wxTextCtrl( m_panel21, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
   bSizer31->Add( m_textCtrl31, 1, wxEXPAND, 5 );
   m_panel21->SetSizer( bSizer31 );
   m_panel21->Layout();
   bSizer31->Fit( m_panel21 );

   m_mgr.AddPane(m_panel21,
      wxAuiPaneInfo().Name(wxT("EPane1")).Caption(wxT("Enviroment")).
      Right().Layer(1).Position(1).CloseButton(true).MaximizeButton(true));

   this->Layout();
   m_mgr.Update();

resulte of this - is first image
1.JPG
is original result
1.JPG (36.2 KiB) Viewed 23138 times

i want this result on load application
2.JPG
i need this result
2.JPG (35.85 KiB) Viewed 23135 times

all size manipulation with panes and wxAuiNotebook don't help me :(
if creators of library can show how to do it and publish working test sample please
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Re: Pane size

Postby roma_k on Tue Nov 06, 2007 5:25 am

Up
roma_k
Registered User
 
Posts: 1
Joined: Tue Nov 06, 2007 5:24 am

Re: Pane size

Postby Jes on Mon Nov 12, 2007 4:58 am

Up

I think it must be solved :wink:
Let improove it together
Jes
Registered User
 
Posts: 15
Joined: Mon Oct 15, 2007 10:27 am

Return to wxAUI Questions, Thoughts & Feedback