]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/statbox.cpp
correction to last commit: don't test unsetenv() return value, it's void under Darwin
[wxWidgets.git] / src / mac / carbon / statbox.cpp
index cb3b47de9080ca6f8c5424ed88aabdd988802076..9080cab4f11b910c7994c43c9d559ef40d156be7 100644 (file)
@@ -32,7 +32,7 @@ bool wxStaticBox::Create( wxWindow *parent,
     if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
         return false;
 
-    m_label = label;
+    m_labelOrig = m_label = label;
 
     Rect bounds = wxMacGetBoundsForControl( this, pos, size );
 
@@ -68,7 +68,10 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
         }
     }
 
-    *borderTop = extraTop + GetCharHeight();
+    *borderTop = extraTop;
+    if ( !m_label.empty() )
+        *borderTop += GetCharHeight();
+
     *borderOther = other;
 }