added another test radiobox to the controls sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -205,6 +205,13 @@ public:
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnButton(wxMouseEvent& event)
|
||||||
|
{
|
||||||
|
wxLogMessage(_T("MyButton::OnButton"));
|
||||||
|
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
@@ -483,6 +490,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyButton, wxButton)
|
BEGIN_EVENT_TABLE(MyButton, wxButton)
|
||||||
EVT_LEFT_DCLICK(MyButton::OnDClick)
|
EVT_LEFT_DCLICK(MyButton::OnDClick)
|
||||||
|
EVT_BUTTON(-1, MyButton::OnButton)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyComboBox, wxComboBox)
|
BEGIN_EVENT_TABLE(MyComboBox, wxComboBox)
|
||||||
@@ -659,17 +667,26 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
(void)new wxCheckBox( panel, ID_COMBO_ENABLE, "&Disable", wxPoint(20,130), wxSize(140,30) );
|
(void)new wxCheckBox( panel, ID_COMBO_ENABLE, "&Disable", wxPoint(20,130), wxSize(140,30) );
|
||||||
m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
|
m_notebook->AddPage(panel, "wxComboBox", FALSE, Image_Combo);
|
||||||
|
|
||||||
wxString choices2[] =
|
static const wxString choices2[] =
|
||||||
{
|
{
|
||||||
"First", "Second",
|
"First", "Second",
|
||||||
/* "Third",
|
};
|
||||||
"Fourth", "Fifth", "Sixth",
|
|
||||||
"Seventh", "Eighth", "Nineth", "Tenth" */
|
static const wxString choices10[] =
|
||||||
|
{
|
||||||
|
"First", "Second", "Third", "Fourth", "Fifth",
|
||||||
|
"Sixth", "Seventh", "Eighth", "Nineth", "Tenth"
|
||||||
};
|
};
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
(void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
|
|
||||||
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
|
m_radio = new wxRadioBox( panel, ID_RADIOBOX, "T&his", wxPoint(10,10), wxSize(-1,-1), WXSIZEOF(choices), choices, 1, wxRA_SPECIFY_COLS );
|
||||||
|
(void)new MyRadioBox( panel, ID_RADIOBOX, "&That", wxPoint(10,160), wxSize(-1,-1), WXSIZEOF(choices2), choices2, 1, wxRA_SPECIFY_ROWS );
|
||||||
|
|
||||||
|
wxRadioBox *radio2 = new wxRadioBox(panel, -1, "And another one with very very long title",
|
||||||
|
wxPoint(165, 115), wxDefaultSize,
|
||||||
|
WXSIZEOF(choices10), choices10,
|
||||||
|
3, wxRA_SPECIFY_COLS);
|
||||||
|
radio2->SetToolTip("Test tooltip");
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?");
|
m_combo->SetToolTip("This is a natural\ncombobox - can you believe me?");
|
||||||
@@ -680,10 +697,11 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "&Select 'This'", wxPoint(180,80), wxSize(140,30) );
|
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "&Select 'This'", wxPoint(180,80), wxSize(140,30) );
|
||||||
m_fontButton = new wxButton( panel, ID_SET_FONT, "Set &more Italic font", wxPoint(340,30), wxSize(140,30) );
|
m_fontButton = new wxButton( panel, ID_SET_FONT, "Set &more Italic font", wxPoint(340,30), wxSize(140,30) );
|
||||||
(void)new wxButton( panel, ID_RADIOBOX_FONT, "Set &Italic font", wxPoint(340,80), wxSize(140,30) );
|
(void)new wxButton( panel, ID_RADIOBOX_FONT, "Set &Italic font", wxPoint(340,80), wxSize(140,30) );
|
||||||
(void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "&Disable", wxPoint(340,130), wxDefaultSize );
|
(void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "&Disable", wxPoint(400,130), wxDefaultSize );
|
||||||
wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, "Radiobutton1", wxPoint(210,170), wxDefaultSize, wxRB_GROUP );
|
wxRadioButton *rb = new wxRadioButton( panel, ID_RADIOBUTTON_1, "Radio&1",
|
||||||
rb->SetValue( FALSE );
|
wxPoint(400,170), wxDefaultSize, wxRB_GROUP );
|
||||||
(void)new wxRadioButton( panel, ID_RADIOBUTTON_2, "&Radiobutton2", wxPoint(340,170), wxDefaultSize );
|
rb->SetValue( TRUE );
|
||||||
|
(void)new wxRadioButton( panel, ID_RADIOBUTTON_2, "Radio&2", wxPoint(460,170), wxDefaultSize );
|
||||||
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
|
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
|
||||||
|
|
||||||
panel = new wxPanel(m_notebook);
|
panel = new wxPanel(m_notebook);
|
||||||
|
Reference in New Issue
Block a user