]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
up to 2.8.0
[wxWidgets.git] / src / common / combocmn.cpp
index ba69cd71883a15866ef5a4dfe96c81e34874061e..f47619998ea5541fdafc8f0544e9a0452941b9bd 100644 (file)
@@ -355,6 +355,7 @@ public:
 #if USES_WXPOPUPTRANSIENTWINDOW
     virtual bool Show( bool show );
     virtual bool ProcessLeftDown(wxMouseEvent& event);
+protected:
     virtual void OnDismiss();
 #endif
 
@@ -1003,10 +1004,11 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
     if ( !m_text )
         return;
 
+#if !TEXTCTRL_TEXT_CENTERED
+
     wxSize sz = GetClientSize();
-    int customBorder = m_widthCustomBorder;
 
-#if !TEXTCTRL_TEXT_CENTERED
+    int customBorder = m_widthCustomBorder;
     if ( (m_text->GetWindowStyleFlag() & wxBORDER_MASK) == wxNO_BORDER )
     {
         // Centre textctrl
@@ -1033,10 +1035,10 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust
         }
     }
     else
-#else
+#else // TEXTCTRL_TEXT_CENTERED
     wxUnusedVar(textCtrlXAdjust);
     wxUnusedVar(textCtrlYAdjust);
-#endif
+#endif // !TEXTCTRL_TEXT_CENTERED/TEXTCTRL_TEXT_CENTERED
     {
         // If it has border, have textctrl will the entire text field.
         m_text->SetSize( m_tcArea.x + m_widthCustomPaint,