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:
@@ -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
|
||||
|
Reference in New Issue
Block a user