X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2851207a67cf0ca12bf83611ecd6a4367d30f53..b67397a779eef3fb22ee143c8bd4e027c8c5dfc8:/src/propgrid/editors.cpp diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 87ea4c0d88..f7822f01de 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -283,9 +283,18 @@ void wxPGTextCtrlEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) else s = property->GetDisplayedString(); - tc->SetValue(s); -} + tc->SetValue(s); + // + // Fix indentation, just in case (change in font boldness is one good + // reason). +#if defined(__WXMSW__) && !defined(__WXWINCE__) + ::SendMessage(GetHwndOf(tc), + EM_SETMARGINS, + EC_LEFTMARGIN | EC_RIGHTMARGIN, + MAKELONG(0, 0)); +#endif +} // Provided so that, for example, ComboBox editor can use the same code // (multiple inheritance would get way too messy). @@ -1577,6 +1586,9 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX() void wxPropertyGrid::CorrectEditorWidgetPosY() { + if ( m_selColumn == -1 ) + return; + if ( m_selected && (m_wndEditor || m_wndEditor2) ) { wxRect r = GetEditorWidgetRect(m_selected, m_selColumn);