Kirix Support Forums

Solved: wxPanel inside wxFrame implementign wxAUI

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

Solved: wxPanel inside wxFrame implementign wxAUI

Postby Lord Darkblade on Tue Aug 29, 2006 8:05 am

EDIT: Problem solved, the wxTextCtrl was taking the frame as its parent rather than the wxPanel. Not quite sure why this failed so badly however altering the parent solved the problem.

Thanks

///////////////////////////////////////////////////////////////////////////////

I currently have a wxFrame (MyFrame copied from the demo application on this site), I have added a globally declared panel to the frame and components within this (wxTextCtrl right now). The panel when moved will move however the wxTextCtrl will stay fixed in its original position (though it cannot now be activated). If I move the wxPanel / Pane back to the left (half height rather than full) the wxTextCtrl remains inactive, increasing this to full height the wxTextCtrl becomes reseated within the panel however until I perform another action I cannot add text or get a caret inside the wxTextCtrl.

Additionally if I do not specify a size for a panel like object (panel, notebook etc) they are shrunk to virtually nothing on the left or right hand sides. Specifying a size fixes this however the window does not then scale proportionally.

MyFrame:
Code: Select all
leftPanel = new wxPanel (this, wxID_ANY, wxDefaultPosition, wxSize(210,170));
leftSizer = new wxBoxSizer (wxVertical);

//... More unrelated instantiations

text1 = new wxTextCtrl (... as per example ...);

leftSizer->Add(text1, 1, wxEXPAND|wxTOP, 20);
// Margin allows pane "handle" to be seen, otherwise the sizer rests on top of this.

leftPanel->SetSizer (leftSizer);
m_mgr.AddPane(leftPanel, wxLeft, wxT("Main Pane"));
m_mgr.Update();


The uninit code and suchlike are untouched, the global declarations are simply in a header file listed in the format:

wxPanel * leftPanel;

MyApp::OnInit is unchanged other than setting a boolean I was planning on using for setting the global visibility of this panel.

Any ideas why the panel is not linked to the pane?

Compiled on Win2K Pro, MSVC6 using wxAUI 0.92, wxWidgets 2.6.?.

Thanks
Lord Darkblade
Registered User
 
Posts: 4
Joined: Tue Aug 29, 2006 7:51 am

Postby Ben on Sun Sep 03, 2006 9:19 am

Hi,

That's great news that you solved this.

Best,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback