How I can change pane size with code manipulation?
all PaneInfo class methods can't do it
Kirix Support Forums
Pane size
6 posts
• Page 1 of 1
Re: Pane size
Hello,
The following code modifies the minimum size of a pane and the best size of a pane.
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.
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
Kirix Support Team
-
Dave - Kirix Support Team
- Posts: 32
- Joined: Wed Sep 21, 2005 11:07 pm
Re: Pane size
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
How set size of Dock?? and how to access without recoding your lib to it and find Dock binded to Pane ??
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
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
That is code
resulte of this - is first image
i want this result on load application
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
- 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
i want this result on load application
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
- Jes
- Registered User
- Posts: 15
- Joined: Mon Oct 15, 2007 10:27 am
6 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback