// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "controls.h"
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
void OnComboButtons( wxCommandEvent &event );
void OnRadio( wxCommandEvent &event );
void OnRadioButtons( wxCommandEvent &event );
+ void OnRadioButton1( wxCommandEvent &event );
+ void OnRadioButton2( wxCommandEvent &event );
void OnSetFont( wxCommandEvent &event );
void OnPageChanged( wxNotebookEvent &event );
void OnPageChanging( wxNotebookEvent &event );
EVT_BUTTON (ID_RADIOBOX_SEL_STR, MyPanel::OnRadioButtons)
EVT_BUTTON (ID_RADIOBOX_FONT, MyPanel::OnRadioButtons)
EVT_CHECKBOX (ID_RADIOBOX_ENABLE, MyPanel::OnRadioButtons)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_1, MyPanel::OnRadioButton1)
+EVT_RADIOBUTTON(ID_RADIOBUTTON_2, MyPanel::OnRadioButton2)
EVT_BUTTON (ID_SET_FONT, MyPanel::OnSetFont)
EVT_SLIDER (ID_SLIDER, MyPanel::OnSliderUpdate)
#if wxUSE_SPINBTN
wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE);
m_text->SetBackgroundColour(wxT("wheat"));
- if ( 0 )
- wxLog::AddTraceMask(_T("focus"));
m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
m_notebook = new wxNotebook(this, ID_NOTEBOOK);
};
// fill the image list
- wxImageList *imagelist = new wxImageList(32, 32);
+ wxBitmap bmp(list_xpm);
+
+ wxImageList *imagelist = new wxImageList(bmp.GetWidth(), bmp.GetHeight());
- imagelist-> Add( wxBitmap( list_xpm ));
+ imagelist-> Add( bmp );
imagelist-> Add( wxBitmap( choice_xpm ));
imagelist-> Add( wxBitmap( combo_xpm ));
imagelist-> Add( wxBitmap( text_xpm ));
event.GetId() == ID_BUTTON_TEST1 ? _T('1') : _T('2'));
}
-void MyPanel::OnBmpButton(wxCommandEvent& event)
+void MyPanel::OnBmpButton(wxCommandEvent& WXUNUSED(event))
{
wxLogMessage(_T("Bitmap button clicked."));
}
m_text->AppendText( _T("\n") );
}
+void MyPanel::OnRadioButton1( wxCommandEvent & WXUNUSED(event) )
+{
+ wxMessageBox(_T("First wxRadioButton selected."), _T("wxControl sample"));
+}
+
+void MyPanel::OnRadioButton2( wxCommandEvent & WXUNUSED(event) )
+{
+ m_text->AppendText(_T("Second wxRadioButton selected.\n"));
+}
+
void MyPanel::OnRadioButtons( wxCommandEvent &event )
{
switch (event.GetId())
// The wxICON() macros loads an icon from a resource under Windows
// and uses an #included XPM image under GTK+ and Motif
+#ifdef USE_XPM
SetIcon( wxICON(mondrian) );
+#endif
wxMenu *file_menu = new wxMenu;
}
#if wxUSE_TOOLTIPS
-void MyFrame::OnSetTooltipDelay(wxCommandEvent& event)
+void MyFrame::OnSetTooltipDelay(wxCommandEvent& WXUNUSED(event))
{
static long s_delay = 5000;
wxLogStatus(this, _T("Tooltip delay set to %ld milliseconds"), s_delay);
}
-void MyFrame::OnToggleTooltips(wxCommandEvent& event)
+void MyFrame::OnToggleTooltips(wxCommandEvent& WXUNUSED(event))
{
static bool s_enabled = TRUE;