]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/editors.cpp
Implement wxSTAY_ON_TOP for wxMessageDialog in wxGTK.
[wxWidgets.git] / src / propgrid / editors.cpp
index 940b2f62fe54d3fdeb1ee4d6ce48b57da129ecfc..5acd8064d3650fc56209980babbd3c64c4c9055a 100644 (file)
@@ -1528,9 +1528,6 @@ wxWindow* wxPropertyGrid::GetEditorControl() const
 
 void wxPropertyGrid::CorrectEditorWidgetSizeX()
 {
 
 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];
     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()
 {
 
 void wxPropertyGrid::CorrectEditorWidgetPosY()
 {
-    if ( m_selColumn == -1 )
-        return;
-
     if ( GetSelection() && (m_wndEditor || m_wndEditor2) )
     {
         wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn);
     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;
 
 
     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);
         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);
     {
         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__
     }
 
 #ifdef __WXMSW__