test Freeze/Thaw completely, including clearing and setting insertion point
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -311,20 +311,21 @@ private:
|
|||||||
void DoAddText(bool freeze)
|
void DoAddText(bool freeze)
|
||||||
{
|
{
|
||||||
wxTextCtrl * const text = m_panel->m_textrich;
|
wxTextCtrl * const text = m_panel->m_textrich;
|
||||||
text->Clear();
|
|
||||||
|
|
||||||
if ( freeze )
|
if ( freeze )
|
||||||
text->Freeze();
|
text->Freeze();
|
||||||
|
|
||||||
|
text->Clear();
|
||||||
|
|
||||||
for ( int i = 0; i < 100; i++ )
|
for ( int i = 0; i < 100; i++ )
|
||||||
{
|
{
|
||||||
text->AppendText(wxString::Format(wxT("Line %i\n"), i));
|
text->AppendText(wxString::Format(wxT("Line %i\n"), i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
text->SetInsertionPoint(0);
|
||||||
|
|
||||||
if ( freeze )
|
if ( freeze )
|
||||||
text->Thaw();
|
text->Thaw();
|
||||||
|
|
||||||
text->SetInsertionPoint(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MyPanel *m_panel;
|
MyPanel *m_panel;
|
||||||
|
Reference in New Issue
Block a user