void MyFrame::LogDialog(wxCommandEvent& event)
{
- wxLogMessage("This is some message - everything is ok so far.");
- wxLogMessage("Another message...\n... this one is on multiple lines");
- wxLogWarning("And then something went wrong!");
+ // calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
+ // being flushed -- test it
+ {
+ wxBusyCursor bc;
+ wxLogMessage("This is some message - everything is ok so far.");
+ wxLogMessage("Another message...\n... this one is on multiple lines");
+ wxLogWarning("And then something went wrong!");
+ }
+
wxLogError("Intermediary error handler decided to abort.");
wxLogError("The top level caller detected an unrecoverable error.");
MyModelessDialog::MyModelessDialog(wxWindow *parent)
: wxDialog(parent, -1, wxString("Modeless dialog"))
{
- (void)new wxButton(this, DIALOGS_MODELESS_BTN, "Press me");
- Fit();
- Centre();
+ wxBoxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
+
+ wxButton *btn = new wxButton(this, DIALOGS_MODELESS_BTN, "Press me");
+ wxCheckBox *check = new wxCheckBox(this, -1, "Should be disabled");
+ check->Disable();
+
+ sizerTop->Add(btn, 1, wxEXPAND | wxALL, 5);
+ sizerTop->Add(check, 1, wxEXPAND | wxALL, 5);
+
+ SetAutoLayout(TRUE);
+ SetSizer(sizerTop);
+
+ sizerTop->SetSizeHints(this);
+ sizerTop->Fit(this);
}
void MyModelessDialog::OnClose(wxCloseEvent& event)