wxListCtrl getting content of cell via wxListEvent

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
mybofy
Knows some wx things
Knows some wx things
Posts: 38
Joined: Fri Aug 07, 2015 2:09 pm

wxListCtrl getting content of cell via wxListEvent

Post by mybofy »

Bonjour

I have a wxListCtrl :
list0 = new wxListView(panel0, ID_ListeCtrl, point0, size0, wxLC_REPORT);
How to obtain the content of a cell at row and column when I click on that cell ?

If I use EVT_LIST_ITEM_SELECTED, event.GetText give me only the content at the cell at column 0.

Merci de l'aide
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListCtrl getting content of cell via wxListEvent

Post by doublemax »

http://docs.wxwidgets.org/trunk/classwx ... c4ed5cf113

However, according to that documentation, the column is only returned under Window. Under other platforms you could try to use the mouse position and iterate over the column widths to determine over which column the mouse pointer is.
Use the source, Luke!
Post Reply