if ( m_frameStatusBar )
{
wxString msg;
- wxSize sizeCl = GetClientSize();
- msg.Printf(_("pos=(%d, %d), size=%dx%d (client=%dx%d)"),
+ wxSize sizeAll = GetSize(),
+ sizeCl = GetClientSize();
+ msg.Printf(_("pos=(%d, %d), size=%dx%d or %dx%d (client=%dx%d)"),
pos.x, pos.y,
size.x, size.y,
+ sizeAll.x, sizeAll.y,
sizeCl.x, sizeCl.y);
SetStatusText(msg, 1);
}
// ============================================================================
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
- : wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) ),
- m_text(NULL), m_notebook(NULL)
+ : wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) )
{
+ m_listbox = NULL;
+ m_listboxSorted = NULL;
+#if wxUSE_CHOICE
+ m_choice = NULL;
+ m_choiceSorted = NULL;
+#endif
+ m_combo = NULL;
+ m_radio = NULL;
+ m_gauge = NULL;
+ m_gaugeVert = NULL;
+ m_slider = NULL;
+ m_fontButton = NULL;
+ m_lbSelectNum = NULL;
+ m_lbSelectThis = NULL;
+#if wxUSE_SPINBTN
+ m_spinbutton = NULL;
+ m_btnProgress = NULL;
+#endif // wxUSE_SPINBTN
+#if wxUSE_SPINCTRL
+ m_spinctrl = NULL;
+#endif // wxUSE_SPINCTRL
+ m_spintext = NULL;
+ m_checkbox = NULL;
+ m_text = NULL;
+ m_notebook = NULL;
+ m_label = NULL;
+
m_text = new wxTextCtrl(this, -1, "This is the log window.\n",
wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE);
m_text->SetBackgroundColour(wxT("wheat"));
m_spintext = new wxTextCtrl( panel, -1, s, wxPoint(20,160), wxSize(80,-1) );
#if wxUSE_SPINBTN
m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,160), wxSize(80, -1) );
- m_spinbutton->SetRange(-10,30);
+ m_spinbutton->SetRange(-40,30);
m_spinbutton->SetValue(initialSpinValue);
m_btnProgress = new wxButton( panel, ID_BTNPROGRESS, "&Show progress dialog",
void MyPanel::OnSpinCtrl(wxSpinEvent& event)
{
+ if (!m_spinctrl)
+ return ;
wxString s;
s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"),
m_spinctrl->GetValue(), event.GetInt());
value.Printf( _T("Spin control up: current = %d\n"),
m_spinbutton->GetValue());
- if ( m_spinbutton->GetValue() > 17 )
+ if ( event.GetPosition() > 17 )
{
value += _T("Preventing the spin button from going above 17.\n");
value.Printf( _T("Spin control down: current = %d\n"),
m_spinbutton->GetValue());
- if ( m_spinbutton->GetValue() < -17 )
+ if ( event.GetPosition() < -17 )
{
value += _T("Preventing the spin button from going below -17.\n");