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/trunk@51494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-02-01 14:14:44 +00:00
parent 144ae5bbbf
commit cd8ba0d9e4
4 changed files with 19 additions and 6 deletions

View File

@@ -2419,6 +2419,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);