X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58935d4a5c5546124b4903907b5785da270b4c31..4566dcbe24d452b729b0bad3f72ad63e6a60037c:/src/propgrid/editors.cpp?ds=sidebyside diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 940b2f62fe..5acd8064d3 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1528,9 +1528,6 @@ wxWindow* wxPropertyGrid::GetEditorControl() const void wxPropertyGrid::CorrectEditorWidgetSizeX() { - if ( m_selColumn == -1 ) - return; - int secWid = 0; int newSplitterx = m_pState->DoGetSplitterPosition(m_selColumn-1); int newWidth = newSplitterx + m_pState->m_colWidths[m_selColumn]; @@ -1573,9 +1570,6 @@ void wxPropertyGrid::CorrectEditorWidgetSizeX() void wxPropertyGrid::CorrectEditorWidgetPosY() { - if ( m_selColumn == -1 ) - return; - if ( GetSelection() && (m_wndEditor || m_wndEditor2) ) { wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn); @@ -1648,7 +1642,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, int tcFlags = wxTE_PROCESS_ENTER | extraStyle; - if ( prop->HasFlag(wxPG_PROP_READONLY) ) + if ( prop->HasFlag(wxPG_PROP_READONLY) && forColumn == 1 ) tcFlags |= wxTE_READONLY; wxPoint p(pos.x,pos.y); @@ -1697,6 +1691,13 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, { tc->SetBackgroundColour(m_colSelBack); tc->SetForegroundColour(m_colSelFore); + + // Normalize margins + #ifdef __WXMSW__ + ::SendMessage(GetHwndOf(tc), EM_SETMARGINS, + EC_LEFTMARGIN | EC_RIGHTMARGIN, + MAKELONG(3, 0)); + #endif } #ifdef __WXMSW__