else
s = property->GetDisplayedString();
+ wxPropertyGrid* pg = property->GetGrid();
+
+ pg->SetupTextCtrlValue(s);
tc->SetValue(s);
//
wxPropertyGrid* pg = property->GetGrid();
wxASSERT(pg); // Really, property grid should exist if editor does
if ( pg )
- tc->SetValue(wxEmptyString);
+ {
+ wxString unspecValueText;
+ pg->SetupTextCtrlValue(unspecValueText);
+ tc->SetValue(unspecValueText);
+ }
}
wxPropertyGrid* pg = property->GetGrid();
wxASSERT(pg); // Really, property grid should exist if editor does
if ( pg )
+ {
+ pg->SetupTextCtrlValue(txt);
tc->SetValue(txt);
+ }
}
cb->SetText( defString );
}
else if ( !(extraStyle & wxCB_READONLY) && defString.length() )
+ {
+ propGrid->SetupTextCtrlValue(defString);
cb->SetValue( defString );
+ }
else
+ {
cb->SetSelection( -1 );
+ }
#ifdef __WXMSW__
cb->Show();
propGrid->SetInternalFlag(wxPG_FL_VALUE_CHANGE_IN_EVENT);
property->SetValueToUnspecified();
if ( !cb->HasFlag(wxCB_READONLY) )
- cb->GetTextCtrl()->SetValue(wxEmptyString);
+ {
+ wxString unspecValueText;
+ propGrid->SetupTextCtrlValue(unspecValueText);
+ cb->GetTextCtrl()->SetValue(unspecValueText);
+ }
return false;
}
}
}
-void wxPGChoiceEditor::SetControlStringValue( wxPGProperty* WXUNUSED(property), wxWindow* ctrl, const wxString& txt ) const
+void wxPGChoiceEditor::SetControlStringValue( wxPGProperty* property,
+ wxWindow* ctrl,
+ const wxString& txt ) const
{
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
wxASSERT( cb );
+ property->GetGrid()->SetupTextCtrlValue(txt);
cb->SetValue(txt);
}
void wxPGComboBoxEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const
{
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
- cb->SetValue(property->GetValueAsString(wxPG_EDITABLE_VALUE));
+ wxString s = property->GetValueAsString(wxPG_EDITABLE_VALUE);
+ property->GetGrid()->SetupTextCtrlValue(s);
+ cb->SetValue(s);
// TODO: If string matches any selection, then select that.
}