Don't prematurely return from Create before appending the choices, and etc.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
508b108103
commit
4af4b52531
@ -50,14 +50,17 @@ bool wxChoice::Create(wxWindow *parent,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name )
|
const wxString& name )
|
||||||
{
|
{
|
||||||
return Create(
|
if ( !Create( parent, id, pos, size, 0, NULL, style, validator, name ) )
|
||||||
parent, id, pos, size, 0, NULL,
|
return false;
|
||||||
style, validator, name );
|
|
||||||
|
|
||||||
Append( choices );
|
Append( choices );
|
||||||
|
|
||||||
if ( !choices.empty() )
|
if ( !choices.empty() )
|
||||||
SetSelection( 0 );
|
SetSelection( 0 );
|
||||||
|
|
||||||
|
SetInitialSize( size );
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxChoice::Create(wxWindow *parent,
|
bool wxChoice::Create(wxWindow *parent,
|
||||||
|
Loading…
Reference in New Issue
Block a user