+void MyFrame::OnSimulateText(wxCommandEvent& WXUNUSED(event))
+{
+ static wxString s_text;
+ const wxString text = wxGetTextFromUser
+ (
+ "Enter text to simulate: ",
+ "wxUIActionSimulator wxWidgets Sample",
+ s_text,
+ this
+ );
+ if ( text.empty() )
+ return;
+
+ s_text = text;
+
+ wxUIActionSimulator sim;
+ m_text->SetFocus();
+ sim.Text(s_text.c_str());
+}
+