From 43868fdedccaf829134f7d8e8bfefb4857a72d38 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 4 May 2012 20:35:52 +0000 Subject: [PATCH 1/1] Improve documentation of wxDataViewCtrl mouse event handling. Explain that catching mouse events directly doesn't work. Also make it clear that double clicking an item can be caught by processing wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED. See #14111. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/dataview.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index c699896803..b17c229060 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -747,7 +747,9 @@ wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_DROP; @event{EVT_DATAVIEW_SELECTION_CHANGED(id, func)} Process a @c wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED event. @event{EVT_DATAVIEW_ITEM_ACTIVATED(id, func)} - Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. + Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event. This event + is triggered by double clicking an item or pressing some special key + (usually "Enter") when it is focused. @event{EVT_DATAVIEW_ITEM_START_EDITING(id, func)} Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING event. This event can be vetoed in order to prevent editing on an item by item @@ -788,6 +790,11 @@ wxEventType wxEVT_COMMAND_DATAVIEW_ITEM_DROP; Process a @c wxEVT_COMMAND_DATAVIEW_ITEM_DROP event. @endEventTable + Notice that this control doesn't allow to process generic mouse events such + as @c wxEVT_LEFT_DOWN in all ports (notably it doesn't work in wxGTK). If + you need to handle any mouse events not covered by the ones above, consider + using a custom renderer for the cells that must handle them. + @library{wxadv} @category{ctrl,dvc} @appearance{dataviewctrl.png} -- 2.45.2