void OnCloseup(wxCommandEvent& event);
void OnComboBox(wxCommandEvent& event);
void OnComboText(wxCommandEvent& event);
+ void OnComboTextPasted(wxClipboardTextEvent& event);
void OnCheckOrRadioBox(wxCommandEvent& event);
EVT_COMBOBOX_CLOSEUP(ComboPage_Combo, ComboboxWidgetsPage::OnCloseup)
EVT_TEXT(ComboPage_Combo, ComboboxWidgetsPage::OnComboText)
EVT_TEXT_ENTER(ComboPage_Combo, ComboboxWidgetsPage::OnComboText)
+ EVT_TEXT_PASTE(ComboPage_Combo, ComboboxWidgetsPage::OnComboTextPasted)
EVT_CHECKBOX(wxID_ANY, ComboboxWidgetsPage::OnCheckOrRadioBox)
EVT_RADIOBOX(wxID_ANY, ComboboxWidgetsPage::OnCheckOrRadioBox)
int sel = m_combobox->GetSelection();
if ( sel != wxNOT_FOUND )
{
-#ifndef __WXGTK__
m_combobox->SetString(sel, m_textChange->GetValue());
-#else
- wxLogMessage(wxT("Not implemented in wxGTK"));
-#endif
}
}
}
}
+void ComboboxWidgetsPage::OnComboTextPasted(wxClipboardTextEvent& event)
+{
+ wxLogMessage("Text pasted from clipboard.");
+ event.Skip();
+}
+
void ComboboxWidgetsPage::OnComboBox(wxCommandEvent& event)
{
long sel = event.GetInt();
wxLogMessage(wxT("Combobox item %ld selected"), sel);
wxLogMessage(wxT("Combobox GetValue(): %s"), m_combobox->GetValue().c_str() );
+
+ if ( event.GetString() != m_combobox->GetValue() )
+ {
+ wxLogMessage("ERROR: Event has different string \"%s\"",
+ event.GetString());
+ }
}
void ComboboxWidgetsPage::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))