Set the value passed to wxComboBox ctor in wxOSX/Cocoa.
The initial value was simply ignored, do use it now if it's specified, i.e. non empty. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -72,8 +72,10 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
Append(n, choices);
|
Append(n, choices);
|
||||||
|
|
||||||
// Set the first item as being selected
|
// Set up the initial value, by default the first item is selected.
|
||||||
if (n > 0)
|
if ( !value.empty() )
|
||||||
|
SetValue(value);
|
||||||
|
else if (n > 0)
|
||||||
SetSelection( 0 );
|
SetSelection( 0 );
|
||||||
|
|
||||||
// Needed because it is a wxControlWithItems
|
// Needed because it is a wxControlWithItems
|
||||||
|
Reference in New Issue
Block a user