#include "wx/wx.h"
#endif
-#if !defined( __WXMSW__ ) || defined( __WIN95__ )
#include "wx/spinbutt.h"
-#endif
#include "wx/tglbtn.h"
#include "wx/bookctrl.h"
#include "wx/imaglist.h"
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr )
- : wxChoice(parent, id, pos, size, n, choices,
+ : wxChoice(parent, id, pos, size, n, choices,
style, validator, name) { }
protected:
#if wxUSE_SLIDER && wxUSE_GAUGE
panel = new wxPanel(m_book);
-
+
wxBoxSizer *main_sizer = new wxBoxSizer( wxHORIZONTAL );
panel->SetSizer( main_sizer );
-
+
wxStaticBoxSizer *gauge_sizer = new wxStaticBoxSizer( wxHORIZONTAL, panel, _T("&wxGauge and wxSlider") );
main_sizer->Add( gauge_sizer, 0, wxALL, 5 );
wxBoxSizer *sz = new wxBoxSizer( wxVERTICAL );
m_slider->SetToolTip(_T("This is a sliding slider"));
#endif // wxUSE_TOOLTIPS
sz->Add( m_slider, 0, wxALL, 10 );
-
+
m_gaugeVert = new wxGauge( panel, wxID_ANY, 100,
wxDefaultPosition, wxSize(wxDefaultCoord, 90),
wxGA_VERTICAL | wxGA_SMOOTH | wxNO_BORDER );
_T("This is also supposed to demonstrate how ")
_T("to use static controls with line wrapping."),
wxDefaultPosition,
- wxSize(240, -1)
+ wxSize(240, wxDefaultCoord)
);
#endif
wrapping_sizer->Add( m_wrappingText );
#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
- m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, _T(""), wxPoint(200, 160), wxSize(80, wxDefaultCoord) );
+ m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, wxEmptyString, wxPoint(200, 160), wxSize(80, wxDefaultCoord) );
m_spinctrl->SetRange(10,30);
m_spinctrl->SetValue(15);
#endif // wxUSE_SPINCTRL
s_selCombo = sel;
}
+ static int s_selChoice = INVALID_SELECTION;
+ sel = m_choice->GetSelection();
+ if ( sel != s_selChoice )
+ {
+ if ( s_selChoice != INVALID_SELECTION )
+ {
+ wxLogMessage(_T("EVT_IDLE: choice selection changed from %d to %d"),
+ s_selChoice, sel);
+ }
+
+ s_selChoice = sel;
+ }
+
event.Skip();
}
void MyPanel::OnCombo( wxCommandEvent &event )
{
wxLogMessage(_T("EVT_COMBOBOX: item %d/%d (event/control), string \"%s\"/\"%s\""),
- event.GetInt(),
+ (int)event.GetInt(),
m_combo->GetSelection(),
event.GetString().c_str(),
m_combo->GetStringSelection().c_str());
void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
{
- SetSize(800, 600);
-#if 0
wxBusyCursor bc;
wxMessageDialog dialog(this, _T("This is a control sample"), _T("About Controls"), wxOK );
dialog.ShowModal();
-#endif
}
void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))