making sure it is only breaking at newlines for measuring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,7 +78,10 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
Point bounds;
|
Point bounds;
|
||||||
|
|
||||||
// try the built-in best size if available
|
// try the built-in best size if available
|
||||||
|
Boolean former = m_peer->GetData<Boolean>( kControlStaticTextIsMultilineTag);
|
||||||
|
m_peer->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 );
|
||||||
m_peer->GetBestRect( &bestsize ) ;
|
m_peer->GetBestRect( &bestsize ) ;
|
||||||
|
m_peer->SetData( kControlStaticTextIsMultilineTag, former );
|
||||||
if ( !EmptyRect( &bestsize ) )
|
if ( !EmptyRect( &bestsize ) )
|
||||||
{
|
{
|
||||||
bounds.h = bestsize.right - bestsize.left ;
|
bounds.h = bestsize.right - bestsize.left ;
|
||||||
|
Reference in New Issue
Block a user