Added a reset-buffer event to give an opportunity to set the default initial style

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-02-01 14:13:51 +00:00
parent 7e27b3c853
commit 8b2a6dfc24
4 changed files with 22 additions and 6 deletions

View File

@@ -2489,6 +2489,15 @@ void wxRichTextParagraphLayoutBox::Reset()
{
Clear();
wxRichTextBuffer* buffer = wxDynamicCast(this, wxRichTextBuffer);
if (buffer && GetRichTextCtrl())
{
wxRichTextEvent event(wxEVT_COMMAND_RICHTEXT_BUFFER_RESET, GetRichTextCtrl()->GetId());
event.SetEventObject(GetRichTextCtrl());
buffer->SendEvent(event, true);
}
AddParagraph(wxEmptyString);
Invalidate(wxRICHTEXT_ALL);