fixed listbox initial size determination

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-11-26 16:35:04 +00:00
parent eda40bfc08
commit 13960e3c69
2 changed files with 8 additions and 4 deletions

View File

@ -393,8 +393,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
gtk_widget_show( GTK_WIDGET(m_list) );
SetBestSize( size );
if ( style & wxLB_SORT )
{
// this will change DoAppend() behaviour
@ -411,6 +409,10 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
DoAppend(choices[i]);
}
// call it after appending the strings to the listbox, otherwise it doesn't
// work correctly
SetBestSize( size );
m_parent->DoAddChild( this );
PostCreation();

View File

@ -393,8 +393,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
gtk_widget_show( GTK_WIDGET(m_list) );
SetBestSize( size );
if ( style & wxLB_SORT )
{
// this will change DoAppend() behaviour
@ -411,6 +409,10 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
DoAppend(choices[i]);
}
// call it after appending the strings to the listbox, otherwise it doesn't
// work correctly
SetBestSize( size );
m_parent->DoAddChild( this );
PostCreation();