Implement and test _HEADER_RIGHT_CLICK event for GTK+
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -829,7 +829,9 @@ void MyFrame::OnHeaderRightClick( wxDataViewEvent &event )
|
|||||||
if(!m_log)
|
if(!m_log)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxLogMessage("wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, Column: %d", event.GetColumn());
|
int pos = m_musicCtrl->GetColumnPosition( event.GetDataViewColumn() );
|
||||||
|
|
||||||
|
wxLogMessage("wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, Column position: %d", pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSorted( wxDataViewEvent &event )
|
void MyFrame::OnSorted( wxDataViewEvent &event )
|
||||||
|
@@ -1975,6 +1975,16 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gdk_event->button == 3)
|
||||||
|
{
|
||||||
|
wxDataViewCtrl *dv = column->GetOwner();
|
||||||
|
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, dv->GetId() );
|
||||||
|
event.SetDataViewColumn( column );
|
||||||
|
event.SetModel( dv->GetModel() );
|
||||||
|
if (dv->GetEventHandler()->ProcessEvent( event ))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user