+void MyFrame::OnSetBlinkTime(wxCommandEvent& WXUNUSED(event))
+{
+ long blinkTime = wxGetNumberFromUser
+ (
+ _T("The caret blink time is the time between two blinks"),
+ _T("Time in milliseconds:"),
+ _T("wxCaret sample"),
+ wxCaret::GetBlinkTime(), 0, 10000,
+ this
+ );
+ if ( blinkTime != -1 )
+ {
+ wxCaret::SetBlinkTime((int)blinkTime);
+ m_canvas->CreateCaret();
+ wxLogStatus(this, _T("Blink time set to %ld milliseconds."), blinkTime);
+ }
+}
+
+void MyFrame::OnSetFontSize(wxCommandEvent& WXUNUSED(event))
+{
+ long fontSize = wxGetNumberFromUser
+ (
+ _T("The font size also determines the caret size so\nthis demonstrates resizing the caret."),
+ _T("Font size (in points):"),
+ _T("wxCaret sample"),
+ 12, 1, 100,
+ this
+ );
+
+ if ( fontSize != -1 )
+ {
+ m_canvas->SetFontSize((int)fontSize);
+ }
+}