support wxListCtrl::GetViewRect() in report view too; test it in the sample (#9484)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -90,6 +90,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(LIST_TOGGLE_MULTI_SEL, MyFrame::OnToggleMultiSel)
|
||||
EVT_MENU(LIST_SHOW_COL_INFO, MyFrame::OnShowColInfo)
|
||||
EVT_MENU(LIST_SHOW_SEL_INFO, MyFrame::OnShowSelInfo)
|
||||
EVT_MENU(LIST_SHOW_VIEW_RECT, MyFrame::OnShowViewRect)
|
||||
EVT_MENU(LIST_FREEZE, MyFrame::OnFreeze)
|
||||
EVT_MENU(LIST_THAW, MyFrame::OnThaw)
|
||||
EVT_MENU(LIST_TOGGLE_LINES, MyFrame::OnToggleLines)
|
||||
@@ -234,6 +235,7 @@ MyFrame::MyFrame(const wxChar *title)
|
||||
menuList->AppendSeparator();
|
||||
menuList->Append(LIST_SHOW_COL_INFO, _T("Show &column info\tCtrl-C"));
|
||||
menuList->Append(LIST_SHOW_SEL_INFO, _T("Show &selected items\tCtrl-S"));
|
||||
menuList->Append(LIST_SHOW_VIEW_RECT, _T("Show &view rect"));
|
||||
menuList->AppendSeparator();
|
||||
menuList->Append(LIST_SORT, _T("Sor&t\tCtrl-T"));
|
||||
menuList->AppendSeparator();
|
||||
@@ -643,6 +645,13 @@ void MyFrame::OnShowSelInfo(wxCommandEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
|
||||
void MyFrame::OnShowViewRect(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
const wxRect r = m_listCtrl->GetViewRect();
|
||||
wxLogMessage("View rect: (%d, %d)-(%d, %d)",
|
||||
r.GetLeft(), r.GetTop(), r.GetRight(), r.GetBottom());
|
||||
}
|
||||
|
||||
void MyFrame::OnShowColInfo(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int count = m_listCtrl->GetColumnCount();
|
||||
|
Reference in New Issue
Block a user