Added some missing SetupTextCtrlValue() calls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -280,6 +280,9 @@ void wxPGTextCtrlEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl )
|
|||||||
else
|
else
|
||||||
s = property->GetDisplayedString();
|
s = property->GetDisplayedString();
|
||||||
|
|
||||||
|
wxPropertyGrid* pg = property->GetGrid();
|
||||||
|
|
||||||
|
pg->SetupTextCtrlValue(s);
|
||||||
tc->SetValue(s);
|
tc->SetValue(s);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -367,7 +370,11 @@ void wxPGTextCtrlEditor::SetValueToUnspecified( wxPGProperty* property, wxWindow
|
|||||||
wxPropertyGrid* pg = property->GetGrid();
|
wxPropertyGrid* pg = property->GetGrid();
|
||||||
wxASSERT(pg); // Really, property grid should exist if editor does
|
wxASSERT(pg); // Really, property grid should exist if editor does
|
||||||
if ( pg )
|
if ( pg )
|
||||||
tc->SetValue(wxEmptyString);
|
{
|
||||||
|
wxString unspecValueText;
|
||||||
|
pg->SetupTextCtrlValue(unspecValueText);
|
||||||
|
tc->SetValue(unspecValueText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -378,8 +385,11 @@ void wxPGTextCtrlEditor::SetControlStringValue( wxPGProperty* property, wxWindow
|
|||||||
wxPropertyGrid* pg = property->GetGrid();
|
wxPropertyGrid* pg = property->GetGrid();
|
||||||
wxASSERT(pg); // Really, property grid should exist if editor does
|
wxASSERT(pg); // Really, property grid should exist if editor does
|
||||||
if ( pg )
|
if ( pg )
|
||||||
|
{
|
||||||
|
pg->SetupTextCtrlValue(txt);
|
||||||
tc->SetValue(txt);
|
tc->SetValue(txt);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxPGTextCtrlEditor::OnFocus( wxPGProperty*, wxWindow* wnd ) const
|
void wxPGTextCtrlEditor::OnFocus( wxPGProperty*, wxWindow* wnd ) const
|
||||||
@@ -896,9 +906,14 @@ wxWindow* wxPGChoiceEditor::CreateControlsBase( wxPropertyGrid* propGrid,
|
|||||||
cb->SetText( defString );
|
cb->SetText( defString );
|
||||||
}
|
}
|
||||||
else if ( !(extraStyle & wxCB_READONLY) && defString.length() )
|
else if ( !(extraStyle & wxCB_READONLY) && defString.length() )
|
||||||
|
{
|
||||||
|
propGrid->SetupTextCtrlValue(defString);
|
||||||
cb->SetValue( defString );
|
cb->SetValue( defString );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
cb->SetSelection( -1 );
|
cb->SetSelection( -1 );
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
cb->Show();
|
cb->Show();
|
||||||
@@ -970,7 +985,11 @@ bool wxPGChoiceEditor::OnEvent( wxPropertyGrid* propGrid, wxPGProperty* property
|
|||||||
propGrid->SetInternalFlag(wxPG_FL_VALUE_CHANGE_IN_EVENT);
|
propGrid->SetInternalFlag(wxPG_FL_VALUE_CHANGE_IN_EVENT);
|
||||||
property->SetValueToUnspecified();
|
property->SetValueToUnspecified();
|
||||||
if ( !cb->HasFlag(wxCB_READONLY) )
|
if ( !cb->HasFlag(wxCB_READONLY) )
|
||||||
cb->GetTextCtrl()->SetValue(wxEmptyString);
|
{
|
||||||
|
wxString unspecValueText;
|
||||||
|
propGrid->SetupTextCtrlValue(unspecValueText);
|
||||||
|
cb->GetTextCtrl()->SetValue(unspecValueText);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -998,10 +1017,13 @@ bool wxPGChoiceEditor::GetValueFromControl( wxVariant& variant, wxPGProperty* pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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;
|
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
|
||||||
wxASSERT( cb );
|
wxASSERT( cb );
|
||||||
|
property->GetGrid()->SetupTextCtrlValue(txt);
|
||||||
cb->SetValue(txt);
|
cb->SetValue(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1043,7 +1065,9 @@ WX_PG_IMPLEMENT_INTERNAL_EDITOR_CLASS(ComboBox,
|
|||||||
void wxPGComboBoxEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const
|
void wxPGComboBoxEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const
|
||||||
{
|
{
|
||||||
wxOwnerDrawnComboBox* cb = (wxOwnerDrawnComboBox*)ctrl;
|
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.
|
// TODO: If string matches any selection, then select that.
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user