X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/293b15f78d8873a65837c3d165dd739ec23dad8c..31ec8b4e151a0dc6f4423bb1bf1420d2af1137fa:/src/generic/vlbox.cpp diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index df4a9bbfb0..0d7f8ef199 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -51,6 +51,8 @@ BEGIN_EVENT_TABLE(wxVListBox, wxVScrolledWindow) EVT_SET_FOCUS(wxVListBox::OnSetOrKillFocus) EVT_KILL_FOCUS(wxVListBox::OnSetOrKillFocus) + + EVT_SIZE(wxVListBox::OnSize) END_EVENT_TABLE() // ============================================================================ @@ -58,6 +60,7 @@ END_EVENT_TABLE() // ============================================================================ IMPLEMENT_ABSTRACT_CLASS(wxVListBox, wxVScrolledWindow) +const char wxVListBoxNameStr[] = "wxVListBox"; // ---------------------------------------------------------------------------- // wxVListBox creation @@ -424,11 +427,11 @@ void wxVListBox::OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const flags |= wxCONTROL_SELECTED; if ( IsCurrent(n) ) flags |= wxCONTROL_CURRENT; - if ( wxWindow::FindFocus() == wx_const_cast(wxVListBox*, this) ) + if ( wxWindow::FindFocus() == const_cast(this) ) flags |= wxCONTROL_FOCUSED; wxRendererNative::Get().DrawItemSelectionRect( - wx_const_cast(wxVListBox *, this), dc, rect, flags); + const_cast(this), dc, rect, flags); } } @@ -494,6 +497,11 @@ void wxVListBox::OnSetOrKillFocus(wxFocusEvent& WXUNUSED(event)) RefreshSelected(); } +void wxVListBox::OnSize(wxSizeEvent& event) +{ + UpdateScrollbar(); + event.Skip(); +} // ============================================================================ // wxVListBox keyboard/mouse handling