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