show column width in the column event handlers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -661,19 +661,30 @@ void MyListCtrl::OnColRightClick(wxListEvent& event)
|
|||||||
wxLogMessage( wxT("OnColumnRightClick at %d."), event.GetColumn() );
|
wxLogMessage( wxT("OnColumnRightClick at %d."), event.GetColumn() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyListCtrl::LogColEvent(const wxListEvent& event, const wxChar *name)
|
||||||
|
{
|
||||||
|
const int col = event.GetColumn();
|
||||||
|
|
||||||
|
wxLogMessage(wxT("%s: column %d (width = %d or %d)."),
|
||||||
|
name,
|
||||||
|
col,
|
||||||
|
event.GetItem().GetWidth(),
|
||||||
|
GetColumnWidth(col));
|
||||||
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnColBeginDrag(wxListEvent& event)
|
void MyListCtrl::OnColBeginDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( wxT("OnColBeginDrag: column %d."), event.GetColumn() );
|
LogColEvent( event, wxT("OnColBeginDrag") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnColDragging(wxListEvent& event)
|
void MyListCtrl::OnColDragging(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( wxT("OnColDragging: column %d."), event.GetColumn() );
|
LogColEvent( event, wxT("OnColDragging") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnColEndDrag(wxListEvent& event)
|
void MyListCtrl::OnColEndDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( wxT("OnColEndDrag: column %d."), event.GetColumn() );
|
LogColEvent( event, wxT("OnColEndDrag") );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||||
|
@@ -58,6 +58,7 @@ private:
|
|||||||
void SetColumnImage(int col, int image);
|
void SetColumnImage(int col, int image);
|
||||||
|
|
||||||
void LogEvent(const wxListEvent& event, const wxChar *eventName);
|
void LogEvent(const wxListEvent& event, const wxChar *eventName);
|
||||||
|
void LogColEvent(const wxListEvent& event, const wxChar *eventName);
|
||||||
|
|
||||||
virtual wxString OnGetItemText(long item, long column) const;
|
virtual wxString OnGetItemText(long item, long column) const;
|
||||||
virtual int OnGetItemImage(long item) const;
|
virtual int OnGetItemImage(long item) const;
|
||||||
|
Reference in New Issue
Block a user