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

Function PyCListCtrl_SetColumn

Pythonwin/win32ctrlList.cpp:245–268  ·  view source on GitHub ↗

@pymethod int|PyCListCtrl|SetColumn|Changes column state in a list control when in report view.

Source from the content-addressed store, hash-verified

243
244// @pymethod int|PyCListCtrl|SetColumn|Changes column state in a list control when in report view.
245PyObject *PyCListCtrl_SetColumn( PyObject *self, PyObject *args )
246{
247 CListCtrl *pList;
248 int iColNo;
249 PyObject *obLVCol;
250
251 if (!(pList=GetListCtrl(self)))
252 return NULL;
253
254 if (!PyArg_ParseTuple(args, "iO:InsertColumn",
255 &iColNo, // @pyparm int|colNo||The to be modified column number
256 &obLVCol)) // @pyparm <o LV_COLUMN>|item||A tuple describing the modified column.
257 return NULL;
258 LV_COLUMN lvCol;
259 if (!PyWinObject_AsLV_COLUMN(obLVCol, &lvCol))
260 return NULL;
261 GUI_BGN_SAVE;
262 int ret = pList->SetColumn(iColNo, &lvCol);
263 GUI_END_SAVE;
264 PyWinObject_FreeLV_COLUMN(&lvCol);
265 if (ret==-1)
266 RETURN_ERR("SetColumn failed");
267 return PyInt_FromLong(ret);
268}
269
270// @pymethod int|PyCListCtrl|InsertItem|Inserts an item into the list.
271PyObject *PyCListCtrl_InsertItem( PyObject *self, PyObject *args )

Callers

nothing calls this directly

Calls 3

GetListCtrlFunction · 0.85
PyWinObject_AsLV_COLUMNFunction · 0.85

Tested by

no test coverage detected