]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/vlbox.cpp
wxSizer::Fit() now sets client size
[wxWidgets.git] / src / generic / vlbox.cpp
index d9d03f063f23418679d86c1dc78600b3eda8d09a..747d82825164302617dd0b084ee45c1e62f54fea 100644 (file)
@@ -77,6 +77,11 @@ bool wxVListBox::Create(wxWindow *parent,
                         long style,
                         const wxString& name)
 {
+#ifdef __WXMSW__
+       if ((style & wxBORDER_MASK) == wxDEFAULT)
+               style |= wxBORDER_THEME;
+#endif
+
     style |= wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE;
     if ( !wxVScrolledWindow::Create(parent, id, pos, size, style, name) )
         return false;
@@ -629,7 +634,7 @@ void wxVListBox::OnLeftDown(wxMouseEvent& event)
 {
     SetFocus();
 
-    int item = HitTest(event.GetPosition());
+    int item = VirtualHitTest(event.GetPosition().y);
 
     if ( item != wxNOT_FOUND )
     {
@@ -652,7 +657,7 @@ void wxVListBox::OnLeftDown(wxMouseEvent& event)
 
 void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse)
 {
-    int item = HitTest(eventMouse.GetPosition());
+    int item = VirtualHitTest(eventMouse.GetPosition().y);
     if ( item != wxNOT_FOUND )
     {