+ if ( !m_widthCustomPaint )
+ {
+ // No special custom paint area - we can use 0 left margin
+ // with wxTextCtrl.
+ if ( m_text->SetMargins(0) )
+ textCtrlXAdjust = 0;
+ x = m_tcArea.x + m_marginLeft + textCtrlXAdjust;
+ }
+ else
+ {
+ // There is special custom paint area - it is better to
+ // use some margin with the wxTextCtrl.
+ m_text->SetMargins(m_marginLeft);
+ x = m_tcArea.x + m_widthCustomPaint +
+ m_marginLeft + textCtrlXAdjust;
+ }
+
+ // Centre textctrl vertically, if needed