more tests

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-11-11 16:06:38 +00:00
parent 45911360b2
commit d96fbfa52a

View File

@@ -188,6 +188,7 @@ protected:
*m_textRowCur, *m_textRowCur,
*m_textColCur, *m_textColCur,
*m_textPosLast, *m_textPosLast,
*m_textLineLast,
*m_textSelFrom, *m_textSelFrom,
*m_textSelTo; *m_textSelTo;
@@ -284,6 +285,7 @@ TextTestFrame::TextTestFrame(const wxString& title)
m_textRowCur = m_textRowCur =
m_textColCur = m_textColCur =
m_textPosLast = m_textPosLast =
m_textLineLast =
m_textSelFrom = m_textSelFrom =
m_textSelTo = (wxTextCtrl *)NULL; m_textSelTo = (wxTextCtrl *)NULL;
m_sizerText = (wxSizer *)NULL; m_sizerText = (wxSizer *)NULL;
@@ -321,7 +323,7 @@ TextTestFrame::TextTestFrame(const wxString& title)
1, wxRA_SPECIFY_COLS); 1, wxRA_SPECIFY_COLS);
m_chkPassword = new wxCheckBox(m_panel, TextTest_Password, _T("&Password control")); m_chkPassword = new wxCheckBox(m_panel, TextTest_Password, _T("&Password control"));
m_chkWrapLines = new wxCheckBox(m_panel, TextTest_WrapLines, _T("&Horz scrollbar")); m_chkWrapLines = new wxCheckBox(m_panel, TextTest_WrapLines, _T("Line &wrap"));
m_chkReadonly = new wxCheckBox(m_panel, -1, _T("&Read-only mode")); m_chkReadonly = new wxCheckBox(m_panel, -1, _T("&Read-only mode"));
sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL); sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
@@ -354,6 +356,7 @@ TextTestFrame::TextTestFrame(const wxString& title)
m_textPosCur = CreateInfoText(); m_textPosCur = CreateInfoText();
m_textRowCur = CreateInfoText(); m_textRowCur = CreateInfoText();
m_textColCur = CreateInfoText(); m_textColCur = CreateInfoText();
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL); wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
sizerRow->Add(CreateTextWithLabelSizer sizerRow->Add(CreateTextWithLabelSizer
( (
@@ -375,11 +378,14 @@ TextTestFrame::TextTestFrame(const wxString& title)
0, wxLEFT | wxGROW, 5); 0, wxLEFT | wxGROW, 5);
sizerMiddleDown->Add(sizerRow, 0, wxALL | wxGROW, 5); sizerMiddleDown->Add(sizerRow, 0, wxALL | wxGROW, 5);
m_textLineLast = CreateInfoText();
m_textPosLast = CreateInfoText(); m_textPosLast = CreateInfoText();
sizerMiddleDown->Add sizerMiddleDown->Add
( (
CreateTextWithLabelSizer CreateTextWithLabelSizer
( (
_T("Number of lines:"),
m_textLineLast,
_T("Last position:"), _T("Last position:"),
m_textPosLast m_textPosLast
), ),
@@ -604,6 +610,12 @@ void TextTestFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
} }
} }
if ( m_textLineLast )
{
m_textLineLast->SetValue(
wxString::Format(_T("%ld"), m_text->GetNumberOfLines()));
}
if ( m_textSelFrom && m_textSelTo ) if ( m_textSelFrom && m_textSelTo )
{ {
long selFrom, selTo; long selFrom, selTo;