fix for [ 1055191 ] wxTextCtrl::GetStyle() wrong attr and extended stat bar in text ctrl sample with rich text to show font attributes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-11-07 13:01:59 +00:00
parent 7012506a83
commit 093dee5e9d
2 changed files with 31 additions and 0 deletions

View File

@@ -1696,6 +1696,21 @@ void RichTextFrame::OnIdle(wxIdleEvent& WXUNUSED(event))
(const wxChar*) facename,
attr.GetTextColour().Red(), attr.GetTextColour().Green(), attr.GetTextColour().Blue(),
(const wxChar*) alignment);
if (attr.HasFont())
{
if (attr.GetFont().GetWeight() == wxBOLD)
msg += wxT(" BOLD");
else if (attr.GetFont().GetWeight() == wxNORMAL)
msg += wxT(" NORMAL");
if (attr.GetFont().GetStyle() == wxITALIC)
msg += wxT(" ITALIC");
if (attr.GetFont().GetUnderlined())
msg += wxT(" UNDERLINED");
}
SetStatusText(msg);
}
#endif // wxUSE_STATUSBAR