1. wxProgressDialog uses wxWindowDisabler, not (dumb) wxEnableTopLevelWindows
2. some more wxWindowDisabler bugs fixed (updated dialogs sample to test them) 3. Esc won't close the dialogs without cancel button under MSW 4. status bar can be child of windows of clases other than wxFrame (updated statbar sample to show it) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,8 +33,7 @@
|
||||
#error "You need to set wxUSE_STATUSBAR to 1 to compile this sample"
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// for all others, include the necessary headers (this file is usually all you
|
||||
// need because it includes almost all "standard" wxWindows headers
|
||||
// for all others, include the necessary headers
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
#include "wx/frame.h"
|
||||
@@ -45,6 +44,7 @@
|
||||
#include "wx/menu.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/textdlg.h"
|
||||
#include "wx/sizer.h"
|
||||
#endif
|
||||
|
||||
#include "wx/datetime.h"
|
||||
@@ -137,6 +137,13 @@ private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// Our about dialog ith its status bar
|
||||
class MyAboutDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
MyAboutDialog(wxWindow *parent);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -346,8 +353,39 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxMessageBox("wxStatusBar sample\n(c) 2000 Vadim Zeitlin",
|
||||
"About statbar", wxOK | wxICON_INFORMATION, this);
|
||||
MyAboutDialog dlg(this);
|
||||
dlg.ShowModal();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyAboutDialog
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
MyAboutDialog::MyAboutDialog(wxWindow *parent)
|
||||
: wxDialog(parent, -1, wxString("About statbar"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
{
|
||||
wxStaticText *text = new wxStaticText(this, -1,
|
||||
"wxStatusBar sample\n"
|
||||
"(c) 2000 Vadim Zeitlin");
|
||||
|
||||
wxStatusBar *statbar = new wxStatusBar(this, -1);
|
||||
statbar->SetFieldsCount(2);
|
||||
statbar->SetStatusText("This is a status bar", 0);
|
||||
statbar->SetStatusText("in a dialog", 1);
|
||||
|
||||
wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
|
||||
sizerTop->Add(-1, 10, 1, wxGROW);
|
||||
sizerTop->Add(text, 0, wxCENTRE);
|
||||
sizerTop->Add(-1, 10, 1, wxGROW);
|
||||
sizerTop->Add(statbar, 0, wxGROW);
|
||||
|
||||
SetAutoLayout(TRUE);
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->Fit(this);
|
||||
sizerTop->SetSizeHints(this);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user