X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5175dbbd9f20e7fd39e0820ea510c1c6ea349584..dab73021272104a5997f43658831658d8a783474:/src/generic/listctrl.cpp?ds=sidebyside diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 02a2580a92..bf85914d4c 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3203,6 +3203,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) wxListEvent le( command, GetParent()->GetId() ); le.SetEventObject( GetParent() ); + le.m_itemIndex = current; le.m_pointDrag = m_dragStart; GetParent()->GetEventHandler()->ProcessEvent( le ); @@ -4717,7 +4718,7 @@ bool wxGenericListCtrl::Create(wxWindow *parent, return FALSE; // don't create the inner window with the border - style &= ~wxSUNKEN_BORDER; + style &= ~wxBORDER_MASK; m_mainWin = new wxListMainWindow( this, -1, wxPoint(0,0), size, style ); @@ -4913,6 +4914,8 @@ bool wxGenericListCtrl::SetItemData( long item, long data ) bool wxGenericListCtrl::GetItemRect( long item, wxRect &rect, int WXUNUSED(code) ) const { m_mainWin->GetItemRect( item, rect ); + if ( m_mainWin->HasHeader() ) + rect.y += HEADER_HEIGHT + 1; return TRUE; }