Need to call wxVScrolledWindow::UpdateScrollbar() in wxVListBox EVT_SIZE handler. Otherwise resizing wxVListBox does not update visible items count.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -243,6 +243,7 @@ protected:
|
|||||||
void OnLeftDown(wxMouseEvent& event);
|
void OnLeftDown(wxMouseEvent& event);
|
||||||
void OnLeftDClick(wxMouseEvent& event);
|
void OnLeftDClick(wxMouseEvent& event);
|
||||||
void OnSetOrKillFocus(wxFocusEvent& event);
|
void OnSetOrKillFocus(wxFocusEvent& event);
|
||||||
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
void Init();
|
void Init();
|
||||||
|
@@ -51,6 +51,8 @@ BEGIN_EVENT_TABLE(wxVListBox, wxVScrolledWindow)
|
|||||||
|
|
||||||
EVT_SET_FOCUS(wxVListBox::OnSetOrKillFocus)
|
EVT_SET_FOCUS(wxVListBox::OnSetOrKillFocus)
|
||||||
EVT_KILL_FOCUS(wxVListBox::OnSetOrKillFocus)
|
EVT_KILL_FOCUS(wxVListBox::OnSetOrKillFocus)
|
||||||
|
|
||||||
|
EVT_SIZE(wxVListBox::OnSize)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -494,6 +496,11 @@ void wxVListBox::OnSetOrKillFocus(wxFocusEvent& WXUNUSED(event))
|
|||||||
RefreshSelected();
|
RefreshSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxVListBox::OnSize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
UpdateScrollbar();
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxVListBox keyboard/mouse handling
|
// wxVListBox keyboard/mouse handling
|
||||||
|
Reference in New Issue
Block a user