Fix setting the initial value of non-editable wxComboBox in wxQt
Use setCurrentText(), which works for non-editable combo boxes as well as for editable ones, instead of setEditText(), which only works for the latter ones. Closes https://github.com/wxWidgets/wxWidgets/pull/1542
This commit is contained in:
committed by
Vadim Zeitlin
parent
ff3c005519
commit
121336a3d8
@@ -167,7 +167,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
while ( n-- > 0 )
|
||||
m_qtComboBox->addItem( wxQtConvertString( *choices++ ));
|
||||
m_qtComboBox->setEditText( wxQtConvertString( value ));
|
||||
m_qtComboBox->setCurrentText( wxQtConvertString( value ));
|
||||
|
||||
return QtCreateControl( parent, id, pos, size, style, validator, name );
|
||||
}
|
||||
|
Reference in New Issue
Block a user