Fix regression in combobox appearance: it never showed the selected value when
it was read-only any more.
Closes #13688.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70126
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- Provide native implementations of wxDatePickerCtrl and wxTimePickerCtrl.
- Provide native implementations of wxDatePickerCtrl and wxTimePickerCtrl.
+Univ:
+
+- Fix regression with read-only wxComboBox appearance (Jason Erb).
+
+
2.9.3: (released 2011-12-14)
------
2.9.3: (released 2011-12-14)
------
wxString wxComboBox::DoGetValue() const
{
wxString wxComboBox::DoGetValue() const
{
- return GetTextCtrl() ? GetTextCtrl()->GetValue() : wxString();
+ return GetTextCtrl() ? GetTextCtrl()->GetValue() : m_valueString;
}
void wxComboBox::SetValue(const wxString& value)
{
if ( GetTextCtrl() )
GetTextCtrl()->SetValue(value);
}
void wxComboBox::SetValue(const wxString& value)
{
if ( GetTextCtrl() )
GetTextCtrl()->SetValue(value);
+ else
+ m_valueString = value;
}
void wxComboBox::WriteText(const wxString& value)
}
void wxComboBox::WriteText(const wxString& value)
void wxComboBox::DoClear()
{
GetLBox()->Clear();
void wxComboBox::DoClear()
{
GetLBox()->Clear();
- if ( GetTextCtrl() ) GetTextCtrl()->SetValue(wxEmptyString);
+ SetValue(wxEmptyString);
}
void wxComboBox::DoDeleteOneItem(unsigned int n)
}
void wxComboBox::DoDeleteOneItem(unsigned int n)
wxCHECK_RET( IsValid(n), wxT("invalid index in wxComboBox::Delete") );
if (GetSelection() == (int)n)
wxCHECK_RET( IsValid(n), wxT("invalid index in wxComboBox::Delete") );
if (GetSelection() == (int)n)
- if ( GetTextCtrl() ) GetTextCtrl()->SetValue(wxEmptyString);
+ SetValue(wxEmptyString);