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

Function PyCTreeCtrl_SetItem

Pythonwin/win32ctrlTree.cpp:506–525  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

504
505// @pymethod int|PyCTreeCtrl|SetItem|Sets some of all of an items attributes.
506PyObject *PyCTreeCtrl_SetItem( PyObject *self, PyObject *args )
507{
508 CTreeCtrl *pList;
509 PyObject *obTVItem;
510 if (!(pList=GetTreeCtrl(self)))
511 return NULL;
512 if (!PyArg_ParseTuple(args, "O:SetItem",
513 &obTVItem)) // @pyparm <o TV_ITEM>|item||A tuple describing the new item.
514 return NULL;
515 TV_ITEM tvItem;
516 if (!PyWinObject_AsTV_ITEM(obTVItem, &tvItem))
517 return NULL;
518 GUI_BGN_SAVE;
519 BOOL ok = pList->SetItem(&tvItem);
520 GUI_END_SAVE;
521 PyWinObject_FreeTV_ITEM(&tvItem);
522 if (!ok)
523 RETURN_ERR("SetItem failed");
524 RETURN_NONE;
525}
526
527// @pymethod int|PyCTreeCtrl|SetImageList|Assigns an image list to a list view control.
528PyObject *PyCTreeCtrl_SetImageList( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 3

GetTreeCtrlFunction · 0.85
PyWinObject_AsTV_ITEMFunction · 0.85
PyWinObject_FreeTV_ITEMFunction · 0.85

Tested by

no test coverage detected