m_font may not have been set yet. Default to letting GetTextExtent

call GetFont.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-04-03 03:21:54 +00:00
parent 9ec83f8da7
commit 2b1ff57f1e
4 changed files with 4 additions and 4 deletions

View File

@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
if ( width > ret.x )
ret.x = width;
}

View File

@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
if ( width > ret.x )
ret.x = width;
}

View File

@ -542,7 +542,7 @@ wxSize wxChoice::DoGetBestSize() const
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
if ( width > ret.x )
ret.x = width;
}

View File

@ -779,7 +779,7 @@ wxSize wxComboBox::DoGetBestSize() const
size_t count = GetCount();
for ( size_t n = 0; n < count; n++ )
{
GetTextExtent( GetString(n), &width, NULL, NULL, NULL, &m_font );
GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
if ( width > ret.x )
ret.x = width;
}