- wxString msg;
- msg.Printf( _T("This is the about dialog of minimal sample.\n")
- _T("Welcome to %s")
-#ifdef wxBETA_NUMBER
- _T(" (beta %d)!")
-#endif // wxBETA_NUMBER
- , wxVERSION_STRING
-#ifdef wxBETA_NUMBER
- , wxBETA_NUMBER
-#endif // wxBETA_NUMBER
- );
-
- wxMessageBox(msg, "About Minimal", wxOK | wxICON_INFORMATION, this);
+ wxMessageBox(wxT("The caret wxWidgets sample.\n(c) 1999 Vadim Zeitlin"),
+ wxT("About Caret"), wxOK | wxICON_INFORMATION, this);
+}
+
+void MyFrame::OnCaretMove(wxCommandEvent& WXUNUSED(event))
+{
+ m_canvas->MoveCaret(10, 10);
+}
+
+void MyFrame::OnSetBlinkTime(wxCommandEvent& WXUNUSED(event))
+{
+ long blinkTime = wxGetNumberFromUser
+ (
+ wxT("The caret blink time is the time between two blinks"),
+ wxT("Time in milliseconds:"),
+ wxT("wxCaret sample"),
+ wxCaret::GetBlinkTime(), 0, 10000,
+ this
+ );
+ if ( blinkTime != -1 )
+ {
+ wxCaret::SetBlinkTime((int)blinkTime);
+ m_canvas->CreateCaret();
+ wxLogStatus(this, wxT("Blink time set to %ld milliseconds."), blinkTime);
+ }