Editing CListCtrl item
-
I have a simple CListCtrl that allows the user to edit the item (0). To do this the user needs to click on the item once or twice to get into "Edit" mode. Is there a way to allow the user other ways to get into edit mode? Like pressing the right arrow key (VK_RIGHT) or something? -kg Ken Goguen
-
Sure, you can use something like this in the appropriate handler:
int nItem=m_list.GetNextItem(-1,LVNI_SELECTED);
if(nItem>=0){
GotoDlgCtrl(&m_list); // security measure, may not be necessary
m_list.EditLabel(nItem);
}Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
Sometimes we over look the simple things. Thanks. -kg Ken Goguen
-
I have a simple CListCtrl that allows the user to edit the item (0). To do this the user needs to click on the item once or twice to get into "Edit" mode. Is there a way to allow the user other ways to get into edit mode? Like pressing the right arrow key (VK_RIGHT) or something? -kg Ken Goguen
Sure, you can use something like this in the appropriate handler:
int nItem=m_list.GetNextItem(-1,LVNI_SELECTED);
if(nItem>=0){
GotoDlgCtrl(&m_list); // security measure, may not be necessary
m_list.EditLabel(nItem);
}Joaquín M López Muñoz Telefónica, Investigación y Desarrollo