Add support for paragraph spacing attribute to wxTextCtrl in wxMSW.

Use PFM_SPACEAFTER/PFM_SPACEBEFORE to implement support for them.

Closes #16417.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-08-14 12:17:17 +00:00
parent 21da20d579
commit a4f707b8a8

View File

@ -2776,6 +2776,24 @@ bool wxTextCtrl::MSWSetParaFormat(const wxTextAttr& style, long start, long end)
}
}
#if wxUSE_RICHEDIT2
if ( style.HasParagraphSpacingAfter() )
{
pf.dwMask |= PFM_SPACEAFTER;
// Convert from 1/10 mm to TWIPS
pf.dySpaceAfter = (int) (((double) style.GetParagraphSpacingAfter()) * mm2twips / 10.0) ;
}
if ( style.HasParagraphSpacingBefore() )
{
pf.dwMask |= PFM_SPACEBEFORE;
// Convert from 1/10 mm to TWIPS
pf.dySpaceBefore = (int) (((double) style.GetParagraphSpacingBefore()) * mm2twips / 10.0) ;
}
#endif // wxUSE_RICHEDIT2
#if wxUSE_RICHEDIT2
if ( m_verRichEdit > 1 )
{