MCPcopy Create free account
hub / github.com/mhammond/pywin32 / PyCListCtrl_SetItem

Function PyCListCtrl_SetItem

Pythonwin/win32ctrlList.cpp:324–343  ·  view source on GitHub ↗

@pymethod int|PyCListCtrl|SetItem|Sets some of all of an items attributes.

Source from the content-addressed store, hash-verified

322
323// @pymethod int|PyCListCtrl|SetItem|Sets some of all of an items attributes.
324PyObject *PyCListCtrl_SetItem( PyObject *self, PyObject *args )
325{
326 CListCtrl *pList;
327 PyObject *obLVItem;
328 if (!(pList=GetListCtrl(self)))
329 return NULL;
330 if (!PyArg_ParseTuple(args, "O:SetItem",
331 &obLVItem)) // @pyparm <o LV_ITEM>|item||A tuple describing the new item.
332 return NULL;
333 LV_ITEM lvItem;
334 if (!PyWinObject_AsLV_ITEM(obLVItem, &lvItem))
335 return NULL;
336 GUI_BGN_SAVE;
337 BOOL ok = pList->SetItem(&lvItem);
338 GUI_END_SAVE;
339 PyWinObject_FreeLV_ITEM(&lvItem);
340 if (!ok)
341 RETURN_ERR("SetItem failed");
342 RETURN_NONE;
343}
344
345// @pymethod int|PyCListCtrl|SetImageList|Assigns an image list to a list view control.
346PyObject *PyCListCtrl_SetImageList( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 3

GetListCtrlFunction · 0.85
PyWinObject_AsLV_ITEMFunction · 0.85
PyWinObject_FreeLV_ITEMFunction · 0.85

Tested by

no test coverage detected