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

Function PyCTreeCtrl_SetItemData

Pythonwin/win32ctrlTree.cpp:632–650  ·  view source on GitHub ↗

@pymethod int|PyCTreeCtrl|SetItemData|Sets the item's application-specific value.

Source from the content-addressed store, hash-verified

630
631// @pymethod int|PyCTreeCtrl|SetItemData|Sets the item's application-specific value.
632PyObject *PyCTreeCtrl_SetItemData( PyObject *self, PyObject *args )
633{
634 CTreeCtrl *pList = GetTreeCtrl(self);
635 if (!pList) return NULL;
636 HTREEITEM item;
637 int data;
638 if (!PyArg_ParseTuple( args, "ii:SetItemData",
639 &item, // @pyparm HTREEITEM|item||The item whose Data is to be set.
640 &data)) // @pyparm int|Data||New value for the data.
641 return NULL;
642 GUI_BGN_SAVE;
643 BOOL ok = pList->SetItemData(item, data);
644 GUI_END_SAVE;
645 if (!ok)
646 RETURN_ERR("SetItemData failed");
647 // @comm Note that a reference count is not added to the object. This it is your
648 // responsibility to make sure the object remains alive while in the list.
649 RETURN_NONE;
650}
651
652// @pymethod object|PyCTreeCtrl|DeleteAllItems|Deletes all items in the control
653PyObject *PyCTreeCtrl_DeleteAllItems( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 1

GetTreeCtrlFunction · 0.85

Tested by

no test coverage detected