]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/statbox.cpp
New DnD and Clipboard code
[wxWidgets.git] / src / motif / statbox.cpp
index 8f16b556efb95c2600584a6ec877d48cb9ded65b..3e590bae1d455cbf034f29e441c324286bedaccd 100644 (file)
@@ -124,6 +124,20 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
     return TRUE;
 }
 
+wxStaticBox::~wxStaticBox()
+{
+   DetachWidget(m_formWidget);
+   DetachWidget(m_mainWidget);
+   XtDestroyWidget((Widget) m_mainWidget);
+   if (m_labelWidget)
+     XtDestroyWidget((Widget) m_labelWidget);
+   XtDestroyWidget((Widget) m_formWidget);
+
+   m_mainWidget = (WXWidget) 0;
+   m_labelWidget = (WXWidget) 0;
+   m_formWidget = (WXWidget) 0;
+}
+
 void wxStaticBox::SetLabel(const wxString& label)
 {
     if (!m_labelWidget)
@@ -194,10 +208,14 @@ void wxStaticBox::ChangeFont(bool keepOriginalSize)
 void wxStaticBox::ChangeBackgroundColour()
 {
     wxWindow::ChangeBackgroundColour();
+    if (m_labelWidget)
+        DoChangeBackgroundColour(m_labelWidget, m_backgroundColour);
 }
 
 void wxStaticBox::ChangeForegroundColour()
 {
     wxWindow::ChangeForegroundColour();
+    if (m_labelWidget)
+        DoChangeForegroundColour(m_labelWidget, m_foregroundColour);
 }