wxUSE_LOG fixes and sizer adjustements related to positioning with/without LOG output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-07-21 10:29:21 +00:00
parent 48112931db
commit b29903d485
8 changed files with 194 additions and 13 deletions

View File

@@ -115,7 +115,9 @@ public:
void OnFullScreen( wxCommandEvent &event );
wxScrolledWindow *m_scrolled;
#if wxUSE_LOG
wxTextCtrl *m_log;
#endif // wxUSE_LOG
private:
DECLARE_DYNAMIC_CLASS(MyFrame)
@@ -400,13 +402,17 @@ MyFrame::MyFrame()
m_scrolled = new MyScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize(100,100) );
m_scrolled->SetScrollbars( 10, 10, 50, 50 );
#if wxUSE_LOG
m_log = new wxTextCtrl( this, wxID_ANY, _T("This is the log window.\n"), wxPoint(0,0), wxSize(100,100), wxTE_MULTILINE );
wxLog *old_log = wxLog::SetActiveTarget( new wxLogTextCtrl( m_log ) );
delete old_log;
#endif // wxUSE_LOG
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
topsizer->Add( m_scrolled, 1, wxEXPAND );
#if wxUSE_LOG
topsizer->Add( m_log, 0, wxEXPAND );
#endif // wxUSE_LOG
SetAutoLayout( true );
SetSizer( topsizer );