]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/listbox.cpp
wxSetCursor() bug with splitters corrected
[wxWidgets.git] / src / motif / listbox.cpp
index a31b554ed9412b4ba61b5999d250626fec933aea..1bead5e8e571d36aa05f2f79a516ff9bf853a910 100644 (file)
@@ -111,6 +111,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
     m_windowFont = parent->GetFont();
     ChangeFont(FALSE);
     
+    SetCanAddEventHandler(TRUE);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, width, height);
     
     ChangeBackgroundColour();
@@ -511,9 +512,9 @@ wxString wxListBox::GetString(int N) const
         return wxEmptyString;
 }
 
-void wxListBox::SetSize(int x, int y, int width, int height, int sizeFlags)
+void wxListBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 {
-    wxWindow::SetSize(x, y, width, height, sizeFlags);
+    wxWindow::DoSetSize(x, y, width, height, sizeFlags);
     
     // Check resulting size is correct
     int tempW, tempH;
@@ -759,12 +760,19 @@ void wxListBox::ChangeBackgroundColour()
         XmNverticalScrollBar, &vsb,
         NULL);
     
-        /* TODO: should scrollbars be affected? Should probably have separate
-        * function to change them (by default, taken from wxSystemSettings)
+   /* TODO: should scrollbars be affected? Should probably have separate
+    * function to change them (by default, taken from wxSystemSettings)
     */
     wxColour backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE);
     DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
     DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
+
+    XtVaSetValues (hsb,
+        XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
+        NULL);
+    XtVaSetValues (vsb,
+        XmNtroughColor, backgroundColour.AllocColour(XtDisplay(vsb)),
+        NULL);
     
     DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
 }