wxListCtrl - doubleclick question
"Poeschel, Lars"
Lars.Poeschel at mdr.de
Sat Jan 19 09:12:28 PST 2008
Hello!
I use wxWidgets 2.6.3 on Windows 2000 platform.
I have a wxListCtrl in report mode with multiple columns. If a double
click on an item occurs I need to determine which item was clicked and
in which column the user clicked. The first is not the problem ;-)
Here is what I tried so far:
1. Processing EVT_LIST_ITEM_ACTIVATED the resulting wxListEvent gives me
the item (GetIndex), but there seems no way to determine the column.
GetColumn returns 0 since it is only set on EVT_LIST_COL-* events. The
wxPoint returned by GetPoint, from which I could calculate the column,
is not set, since it is only used by DRAG events. If I read the m_col
member of the wxListItem returned by GetItem it is always 0.
2. EVT_LIST_COL_CLICK: From this event I can determine the column, but
it is not generated on clicks on items, only if the header is clicked.
There is no double click available, ok. No Problem, I could test if two
of these events occur in a short time interval.
Does anybody know a way to determine which column was clicked ?
Thanks,
Lars
More information about the wx-users
mailing list