#include "wx/clrpicker.h"
#include "wx/filepicker.h"
#include "wx/fontpicker.h"
#include "wx/clrpicker.h"
#include "wx/filepicker.h"
#include "wx/fontpicker.h"
void OnSetLabel(wxCommandEvent& event);
void OnShowDialog(wxCommandEvent& event);
void Quit(wxCommandEvent& event);
void OnSetLabel(wxCommandEvent& event);
void OnShowDialog(wxCommandEvent& event);
void Quit(wxCommandEvent& event);
EVT_MENU(PANE_EXPAND, MyFrame::OnExpand)
EVT_MENU(PANE_SETLABEL, MyFrame::OnSetLabel)
EVT_MENU(PANE_SHOWDLG, MyFrame::OnShowDialog)
EVT_MENU(PANE_EXPAND, MyFrame::OnExpand)
EVT_MENU(PANE_SETLABEL, MyFrame::OnSetLabel)
EVT_MENU(PANE_SHOWDLG, MyFrame::OnShowDialog)
EVT_MENU(PANE_QUIT, MyFrame::Quit)
EVT_UPDATE_UI(wxID_ANY, MyFrame::UpdateUI)
EVT_MENU(PANE_QUIT, MyFrame::Quit)
EVT_UPDATE_UI(wxID_ANY, MyFrame::UpdateUI)
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(paneMenu, _T("&Pane"));
wxMenuBar *menuBar = new wxMenuBar;
menuBar->Append(paneMenu, _T("&Pane"));
+void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
+{
+ wxAboutDialogInfo info;
+ info.SetName(_("wxCollapsiblePane sample"));
+ info.SetDescription(_("This sample program demonstrates usage of wxCollapsiblePane"));
+ info.SetCopyright(_T("(C) 2006 Francesco Montorsi <frm@users.sourceforge.net>"));
+
+ wxAboutBox(info);
+}
+
void MyFrame::UpdateUI(wxUpdateUIEvent& event)
{
GetMenuBar()->Enable(PANE_COLLAPSE, !m_collPane->IsCollapsed());
GetMenuBar()->Enable(PANE_EXPAND, m_collPane->IsCollapsed());
}
void MyFrame::UpdateUI(wxUpdateUIEvent& event)
{
GetMenuBar()->Enable(PANE_COLLAPSE, !m_collPane->IsCollapsed());
GetMenuBar()->Enable(PANE_EXPAND, m_collPane->IsCollapsed());
}
// ----------------------------------------------------------------------------
// MyDialog
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// MyDialog
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
EVT_BUTTON(PANEDLG_TOGGLESTATUS_BTN, MyDialog::OnToggleStatus)
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
EVT_BUTTON(PANEDLG_TOGGLESTATUS_BTN, MyDialog::OnToggleStatus)
- sz->Add(new wxButton(this, PANEDLG_TOGGLESTATUS_BTN, wxT("Change status")),
+ sz->Add(new wxButton(this, PANEDLG_TOGGLESTATUS_BTN, wxT("Change status")),
- sz->Add(m_collPane, 1, wxGROW|wxALL, 5);
+ sz->Add(m_collPane, 0, wxGROW|wxALL, 5);
sz->Add(new wxTextCtrl(this, -1, wxT("just a test")), 0, wxGROW|wxALL, 5);
sz->AddSpacer(10);
sz->Add(new wxButton(this, wxID_OK), 0, wxALIGN_RIGHT|wxALL, 5);
sz->Add(new wxTextCtrl(this, -1, wxT("just a test")), 0, wxGROW|wxALL, 5);
sz->AddSpacer(10);
sz->Add(new wxButton(this, wxID_OK), 0, wxALIGN_RIGHT|wxALL, 5);