menuText->AppendSeparator();
menuText->Append(TEXT_MOVE_ENDTEXT, _T("Move cursor to the end of &text"));
menuText->Append(TEXT_MOVE_ENDENTRY, _T("Move cursor to the end of &entry"));
- menuText->Append(TEXT_SET_EDITABLE, _T("Toggle &editable state"), _T(""), true);
- menuText->Append(TEXT_SET_ENABLED, _T("Toggle e&nabled state"), _T(""), true);
+ menuText->AppendCheckItem(TEXT_SET_EDITABLE, _T("Toggle &editable state"));
+ menuText->AppendCheckItem(TEXT_SET_ENABLED, _T("Toggle e&nabled state"));
menuText->Check(TEXT_SET_EDITABLE, true);
menuText->Check(TEXT_SET_ENABLED, true);
menuText->AppendSeparator();
menu_bar->Append(menuText, _T("Te&xt"));
wxMenu *menuLog = new wxMenu;
- menuLog->Append(TEXT_LOG_KEY, _T("Log &key events"), _T(""), true);
- menuLog->Append(TEXT_LOG_CHAR, _T("Log &char events"), _T(""), true);
- menuLog->Append(TEXT_LOG_MOUSE, _T("Log &mouse events"), _T(""), true);
- menuLog->Append(TEXT_LOG_TEXT, _T("Log &text events"), _T(""), true);
- menuLog->Append(TEXT_LOG_FOCUS, _T("Log &focus events"), _T(""), true);
+ menuLog->AppendCheckItem(TEXT_LOG_KEY, _T("Log &key events"));
+ menuLog->AppendCheckItem(TEXT_LOG_CHAR, _T("Log &char events"));
+ menuLog->AppendCheckItem(TEXT_LOG_MOUSE, _T("Log &mouse events"));
+ menuLog->AppendCheckItem(TEXT_LOG_TEXT, _T("Log &text events"));
+ menuLog->AppendCheckItem(TEXT_LOG_FOCUS, _T("Log &focus events"));
menuLog->AppendSeparator();
menuLog->Append(TEXT_CLEAR, _T("&Clear the log\tCtrl-C"),
_T("Clear the log window contents"));
}
}
+#if wxUSE_UNICODE
+ key += wxString::Format(_T(" (Unicode: %#04x)"), event.GetUnicodeKey());
+#endif // wxUSE_UNICODE
+
wxLogMessage( _T("%s event: %s (flags = %c%c%c%c)"),
name,
key.c_str(),
// multi line text controls
- m_horizontal = new MyTextCtrl( this, wxID_ANY, _T("Multiline text control with a horizontal scrollbar."),
- wxPoint(10,170), wxSize(140,70), wxTE_MULTILINE | wxHSCROLL );
+ m_horizontal = new MyTextCtrl( this, wxID_ANY, _T("Multiline text control with a horizontal scrollbar.\n"),
+ wxPoint(10,170), wxSize(140,70), wxTE_MULTILINE | wxHSCROLL);
// a little hack to use the command line argument for encoding testing
if ( wxTheApp->argc == 2 )
m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
false, _T(""),
wxFONTENCODING_ISO8859_2));
- m_horizontal->SetValue(_T("®lu»ouèký kùò zbìsile èe¹tina «»"));
+ m_horizontal->AppendText(_T("®lu»ouèký kùò zbìsile èe¹tina «»"));
break;
case '1':
m_horizontal->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxNORMAL,
false, _T(""),
wxFONTENCODING_CP1251));
- m_horizontal->SetValue(_T("Ïðèâåò!"));
+ m_horizontal->AppendText(_T("Ïðèâåò!"));
break;
case '8':
false, _T(""),
wxFONTENCODING_CP1251));
#if wxUSE_UNICODE
- m_horizontal->SetValue(L"\x0412\x0430\x0434\x0438\x043c \x0426");
+ m_horizontal->AppendText(L"\x0412\x0430\x0434\x0438\x043c \x0426");
#else
- m_horizontal->SetValue("ËÁÖÅÔÓÑ ÕÄÁÞÎÙÍ");
+ m_horizontal->AppendText("ËÁÖÅÔÓÑ ÕÄÁÞÎÙÍ");
#endif
}
}
else
{
- m_horizontal->SetValue(_T("Text in default encoding"));
+ m_horizontal->AppendText(_T("Text in default encoding"));
}
m_multitext = new MyTextCtrl( this, wxID_ANY, _T("Multi line."),
_T("very very very long line to test ")
_T("wxHSCROLL style"),
wxPoint(450, 10), wxSize(230, 230),
- wxTE_RICH | wxTE_MULTILINE | wxHSCROLL);
+ wxTE_RICH | wxTE_MULTILINE);
m_textrich->SetStyle(0, 10, *wxRED);
m_textrich->SetStyle(10, 20, *wxBLUE);
m_textrich->SetStyle(30, 40,